ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vLookup, Look up Value (https://www.excelbanter.com/excel-discussion-misc-queries/260110-vlookup-look-up-value.html)

Emece

vLookup, Look up Value
 
Hi,

I have problems when the look up value in the vLookup formula is a date, and
the cell has a differente format.

For example, I specify 03/03/10 as the look up value, but the cell has short
date format, so the real value in the cell is 03/03/2010. As a result, the
formula displays #N/A. How can I solve this?

Thanks in advance

Regards,
Emece.-

JLatham

vLookup, Look up Value
 
It would help to see your VLOOKUP() formula. But I suspect it may look
something like:
=VLOOKUP("03/02/10",Sheet2!A1:B99,2,FALSE)
and in Sheet2, column A you actually have dates. So the text you've entered
( "03/02/10") is treated as text, and not a date, and you don't get a match.

Try a formula like this, using the DATE() function to create the lookup
value to find:
=VLOOKUP(DATE(2010,3,2),E1:F6,2,FALSE)

DATE( ) need arguments in the order of Year, Month, Day, so 2010,3,2 is same
as March 2, 2010.

Another option is to actually put the date to match in a cell and then
reference that cell in your formula, something like
=VLOOKUP(A1,E1:F6,2,FALSE)
with A1 holding the date to match, and E1:F6 being your lookup table.


"Emece" wrote:

Hi,

I have problems when the look up value in the vLookup formula is a date, and
the cell has a differente format.

For example, I specify 03/03/10 as the look up value, but the cell has short
date format, so the real value in the cell is 03/03/2010. As a result, the
formula displays #N/A. How can I solve this?

Thanks in advance

Regards,
Emece.-



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

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