From: Emece on
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.-
From: JLatham on
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.-