ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheetfunction.Vlookup (https://www.excelbanter.com/excel-programming/329367-worksheetfunction-vlookup.html)

Robert Wilcox

Worksheetfunction.Vlookup
 
Hello,

I have unsuccessfully tried Worksheetfunction.Vlookup looking for a date.
It works fine if I place a formula as ActiveCell.Formula = "=Vlookup"

Is their any trick I should be aware of when using the a date value in
Worksheetfunction.Vlookup?

bwilcox



K Dales[_2_]

Worksheetfunction.Vlookup
 
Just make sure the formula parameters match, in type, the cell values. For
example, if the cells are truly dates (not text that looks like dates) then
be sure to use a date value for the lookup; i.e this should work
WorksheetFunction.Vlookup(DateValue("1/1/2005"),LookupRange,2,False)
Where this would not
WorksheetFunction.Vlookup("1/1/2005",LookupRange,2,False)

"Robert Wilcox" wrote:

Hello,

I have unsuccessfully tried Worksheetfunction.Vlookup looking for a date.
It works fine if I place a formula as ActiveCell.Formula = "=Vlookup"

Is their any trick I should be aware of when using the a date value in
Worksheetfunction.Vlookup?

bwilcox





All times are GMT +1. The time now is 06:39 AM.

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