Posts by Hanes109

    Hi All,

    I want to update this formula through vba code..


    =VLOOKUP(VLOOKUP(.Cells(i,6),[Macrobook_V_0.3.6.xlsm]DB_list!$A:$B,2,0),'[Input.xlsx]FREETIME OVERVIEW'!$B:$F,MATCH(VLOOKUP(H2,[Macrobook_V_0.3.6.xlsm]Containers!$A:$B,2,0),'[Input.xlsx]FREETIME OVERVIEW'!$B$10:$F$10,0),0)

    So I wrote this down but its not working. Can anyone please explain what I'm missing in this code.

    1. Dim r As Range, r2 As Range, r3 As Range
    2. Set r = wb3.Sheets(5).[b10].CurrentRegion
    3. Set r2 = ThisWorkbook.Sheets("DB_List").Cells(1).CurrentRegion
    4. Set r3 = ThisWorkbook.Sheets("Containers").Cells(1).CurrentRegion
    5. = Application.VLOOKUP(Application.VLOOKUP(.Cells(i, 6), r2, 2, 0), r2, Application.MATCH(Application.VLOOKUP(.Cells(i, 8), r3, 2, 0), r, 0), 0)
    1. .Cells(2, lh) = Application.VLookup(.Cells(2, 7), x, 2, False)

    KjBox  royUK

    I require lookup code to be filled down but its returning same value for all the cells. Can anyone tell me what I'm missing here..

    Hi, I'm struck in VBA code to find number of rows after fetching the data from another workbook and autofill.

    Macro placed in separate file Dumhost.xlsm( Macro workbook) to update Dummy format.csv (File1) from Xando.csv work (file2).


    • Dumhost.xlsm

      (14.08 kB, downloaded 5 times, last: )

    Hi KjBox, hope you're doing good..

    I'm getting error when running this code and found the root cause as "Header is not string". Its actually value.

    Please help.



    I think the best method would be to have an Input area on the Active workbook where you would enter all 6 Headers, Amounts and Currencies, then click a button to run the macro and update the Output Workbook

    I thought you asked me to add input sheet. I don't require it. Msgbox works fine.

    Your previous macro works but

    I don't require this combo. - Header7, Truck7, 134, CAD

    Required combination -

    Example 1 - Truck7, 134, CAD

    Example 2 - Header7, 154, USD

    Example 3- Ducatti1, 156,AED

    Macro will be running through personal macro workbook.