ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unable to get the Vlookup property of the WorksheetFunction class (https://www.excelbanter.com/excel-programming/356344-unable-get-vlookup-property-worksheetfunction-class.html)

DoctorG

Unable to get the Vlookup property of the WorksheetFunction class
 
Target.Offset(0, 1).Value = WorksheetFunction.VLookup(target_string,
D_PELATES, 2, 0) produces the above error. Any ideas?


Tom Ogilvy

Unable to get the Vlookup property of the WorksheetFunction class
 
That would be indicative of
A: bad arguments
B: the value was not found.

Try this

Target.Offset(0, 1).Value = Application.VLookup(target_string,
D_PELATES, 2, 0)

If that doesn't solve it then another guess on the problem is then D_Pelates
is actually a named range. Then it would be:


Target.Offset(0, 1).Value = Application.VLookup(target_string,
Range("D_PELATES"), 2, 0)

--
Regards,
Tom Ogilvy


"DoctorG" wrote:

Target.Offset(0, 1).Value = WorksheetFunction.VLookup(target_string,
D_PELATES, 2, 0) produces the above error. Any ideas?



All times are GMT +1. The time now is 01:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com