Comparing dates from VLOOKUP functions not working right

S

Sambonator

I have a spreadsheet with a bunch of VLOOKUP functions that pull dates from
different sheets.

When I try to compare the dates I get incorrect results.
E.g. Vlookup Results in A1 shows 5/15/2009, A2 shows 6/1/2009.
When I compare A1 to A2, =IF(A2>A1,TRUE,FALSE) I get FALSE.
If I manually type in 5/15/2009 into B1 and 6/1/2009 into B2, and I do
=IF(B2>B1,TRUE,FALSE) I get TRUE.

What might be going wrong here?
 
T

T. Valko

Sounds like the result of your lookup formula in A1 is a TEXT string and is
not a true Excel date. What result do you get from this formula:

=ISNUMBER(A1)

If A1 contains a true Excel date that formula will return TRUE.
 
M

Max

Some thoughts as to how you can get it all going ...

You can convert all the "dates" in col A to real dates recognized by Excel
in one swoop using Data > Text to Columns (after selecting col A). In step 3
of the wizard, under Col data format, check "Date", then choose the
appropriate date format from the dropdown, eg: MDY. Click Finish. Now,
everything downstream should compute properly.

Celebrate? Click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top