as the title states i am interested in a dynamic looping vlookup
I import data from a csv file. then i create another worksheet to extract what i need via vlookup
the source data will be dynamic. i.e the rows of data will be changing depending on my inputs to a completely different application.
I can;t seem to figure this one out. the code is pretty self explanatory..any help would be great.
data_source = Workbooks("Automation_base_case").book1.csv.Range(Cells(2, 1), Cells(finalrow, 15))
'book1.csv is found in "Automation_base_case"
finalrow_compile = Cells(Rows.Count, 3).End(xlUp).Row
y = 2
Cells(3, 2).Select
For i = 3 To finalrow_compile
ActiveCell.Application.WorksheetFunction.VLookup=(cells(i,1),data_source,y,false)
'getting an error at the line above, it is looking for a close bracket after the cells(i,1) reference
'Application.WorksheetFunction.VLookup(Cells(i, 1), book1.csv.Range(Cells(2, 1), Cells(finalrow, 15)), y, False)
'just an attempt at the above function that didn;t work
y = y + 1
Next i
still somewhat of a noob so your patience is much appreciated.thanks and take care
Bookmarks