VBA/VLOOKUP Error Message
Cells(1, 3) = Application.WorksheetFunction.Vlookup (A1, INVEN, 2)
and you'll probably need to be more specific (VBA usually won't intrepret A1
or INVEN as easily as Excel does when used in a cell formula):
Cells(1, 3) = Application.WorksheetFunction.Vlookup (Range("A1").Value,
Range("INVEN"), 2)
or even even more specific....:
Cells(1, 3) = Application.WorksheetFunction.Vlookup
(Worksheets("Sheet1").Range("A1").Value,
Worksheets("Sheet2").Range("INVEN"), 2)
Hope this doesn't scare you off,
--
George Nicholson
Remove 'Junk' from return address.
"JimFor" wrote in message
...
Thanks. Where exactly do I place that in the formula? Before the Dim
statement? Before the Cells statement? Add it to a particular line?
|