Hi All,
I want to update this formula through vba code..
Formula:
=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.
Code
Dim r As Range, r2 As Range, r3 As Range
Set r = wb3.Sheets(5).[b10].CurrentRegion
Set r2 = ThisWorkbook.Sheets("DB_List").Cells(1).CurrentRegion
Set r3 = ThisWorkbook.Sheets("Containers").Cells(1).CurrentRegion
= Application.VLOOKUP(Application.VLOOKUP(.Cells(i, 6), r2, 2, 0), r2, Application.MATCH(Application.VLOOKUP(.Cells(i, 8), r3, 2, 0), r, 0), 0)