Posts by mythu

    I have been using these two codes CellVal and Private Sub Worksheet_Change(ByVal Target As Range)

    When i run the code CellVal that updates the next ID in the Sheets("Sheet1").Range("B6") if B6 is empty then it loads the first ID and set a trigger on cell B6 for second code, that whenever that cell is update second code is run.

    Explaining second code

    when 1st ID is load in Cell B6 then second code runs and copy the Sheet2.Range(B4) and Paste into Sheet3.Range(B4)

    When 2nd ID is load in Cell B6 then second code runs and copy the Sheet2.Range(B4) and Paste into Sheet3.Range(C4)

    When 3rd ID is load in Cell B6 then second code runs and copy the Sheet2.Range(B4) and Paste into Sheet3.Range(D4)

    same for 4th and 5th and 6th and 7th`and 8th

    Now the problem is that i run the code 8th times to load the next ID in Sheets("Sheet1").Range("B6") I want a help that How to set a trigger for code CellVal in sheet3 that ID will update automatically. If it got resolved then i have to run the code one time to update all values one by one rather than running the code 8th times.

    Any help will be appreciated.


    • Sheet1.xlsm

      (34.26 kB, downloaded 80 times, last: )

    Thank you very much rory for sure Arrays are better. But second issue is still exists that if i run the Module1 code the result comes with error #VALUE! rather than output.


    I have a problem, hopefully someone may be able to help. I have been using MS Office 2016 wherein TEXTJOIN function does not work so i have added EXCEL UDF Function to make it work like TEXTJOIN works.

    Here is the formula

    1. ConcatStringConditional($EJ$2:$EJ$10000,ER3,$EL$2:$EL$10000)

    I have pasted this formula through VBA but it returns with an error that is #VALUE! I have attached a file below wherein UDF and VBA formula both codes are available.

    The code is extremely slow and is it possible to convert this below range into used range like we mostly used lastfor = Sheet2.Cells(Rows.Count, 148).End(xlUp).Row might speed could be better this way if i am not wrong.

    1. $EJ$10000

    I will really appreciate the help.


    • Sheet2.xlsm

      (195.82 kB, downloaded 74 times, last: )

    I have been working on a task where i would have to create a dynamic calendar through VBA. I know you are guiding well way to accomplish the thing via Formula. But i have to follow the task to make it through VBA.

    I have been trying to create a calendar through Excel VBA. Right now the Calendar is working via formula available in the cells.

    My code is working for just three rows whereas 2 are remaining and code is pasting formula which i will convert in values later when it gets completed.

    I have found but all are created by formulas not through VBA if you have some examples then please share or if you can provide solution. Your help will be appreciated.

    I have tried to make this Calendar Dynamic through Excel VBA where i have recorded macros one by one which took mine too much time.

    I hope there would be an easy way to make Calendar Dynamic through VBA.

    Any help will be appreciated.

    Here is my recorded Macros.


    • Sheet1.xlsm

      (34.64 kB, downloaded 80 times, last: )

    thank you very much for the shorter solution.

    But if you test the below attached sheet to filter the data with your code. Why filter is start from Row8 rather than Row11.


    • Data.xlsm

      (20.59 kB, downloaded 71 times, last: )

    I have wrote a code to filter the data with multiple strings but its not working. I have attached a workbook as well your help will be appreciated.


    • Data.xlsm

      (20.1 kB, downloaded 72 times, last: )