I am having trouble with the below VLookup since I am using a the full column range as my lookup value.
Private Sub Worksheet_Activate()
Dim WsFk_Row As Long
Dim WsFk_Clm As Long
Table1 = Sheets("Requirements Update Format").Range("A:A")
Table2 = Sheets("Workstreams Link").Range("A:B")
Set WsFk_Row = Sheets("Requirements Insert Format").Range("I1").Row
Set WsFk_Clm = Sheets("Requirements Insert Format").Range("I1").Column
For Each cl In Table1
Sheets("Requirements Insert Format").Cells(WsFk_Row, WsFk_Clm) = Application.WorksheetFunction.VLookup(cl, Table2, 2, False)
WsFk_Row = WsFk_Row + 1
Next cl
End Sub
This code appropriately populates all rows, however once completed I receive the following error "Unable to get the VLookup property of the WorksheetFunction class". This led me to believe the following line is where my issue begins
Table1 = Sheets("Requirements Update Format").Range("A:A")
I tried resolving this by modifying the line as below, however this prevented the process to run at all.
Table1 = Sheets("Requirements Update Format").Range(Range("A1"), Range("A1").End(xlDown).Select)
Any suggestion on how I can resolve this would be greatly appreciated.
Set
in front of Table1 and Table2? and I don't think you wantset
for your next two lines. – Forward Ed