A
Ayo
I am getting an "Unable to get VLookup property of WorksheetFunction class"
error on line "c.Offset(0, -1) =", even though VendorTable
Referto:=AAV_Table!$B$2:$C$1260
Private Sub cmdUpdate_Click()
Dim c As Range
Dim lRow As Long
Worksheets("MarketList").Activate
lRow = ActiveSheet.UsedRange.Rows.Count
For Each c In Worksheets("MarketList").Range("C2:C" & lRow).Cells
c.Offset(0, -1) = Application.WorksheetFunction.VLookup(c,
VendorTable,2,False)
Next c
End Sub
VendorTable defined here:
Worksheets("AAV_Table").Activate
BOReport_lastRow = ActiveSheet.UsedRange.Rows.Count
ThisWorkbook.Names.Add Name:="VendorTable", _
RefersTo:=Worksheets("AAV_Table").Range("B2:C" & BOReport_lastRow)
error on line "c.Offset(0, -1) =", even though VendorTable
Referto:=AAV_Table!$B$2:$C$1260
Private Sub cmdUpdate_Click()
Dim c As Range
Dim lRow As Long
Worksheets("MarketList").Activate
lRow = ActiveSheet.UsedRange.Rows.Count
For Each c In Worksheets("MarketList").Range("C2:C" & lRow).Cells
c.Offset(0, -1) = Application.WorksheetFunction.VLookup(c,
VendorTable,2,False)
Next c
End Sub
VendorTable defined here:
Worksheets("AAV_Table").Activate
BOReport_lastRow = ActiveSheet.UsedRange.Rows.Count
ThisWorkbook.Names.Add Name:="VendorTable", _
RefersTo:=Worksheets("AAV_Table").Range("B2:C" & BOReport_lastRow)