If statement



I have an if statement that looks at the date on another spreadsheet.

=IF(VLOOKUP($A10,Sheet3!$A$1:$H$81,8,0)>="1/31/2008","x"," ")
=IF(VLOOKUP($A7,Sheet3!A$1:H$81,8,0)>="12/31/2008","x", " ")

All I want is to return the value of "x' if the date on the other sheet is
greater than or equal to the date referenced in the formula (the formula goes
out all 12 months). The problem I am having is that the formula for January
through September work perfectly but for some reason despite the fact that
the value in column 8 is 6/30/2008, the columns labled October through
December are incorrectly returning the value of "x". Currently the date in
the look up field is formatted as text but I have tried to format it as a
date but it didn't change the results.

Any suggestions???

Roger Govier


Your formulae are using two different cells, A7 and A10. Is this

If months January to September are working, and October to December aren't,
it sounds as though it is the fact that you are using a single digit for
your month number.
If you are continuing to use Text values in both cases use


If all values are converted to true Excel dates, then use
=IF(VLOOKUP($A10,Sheet3!$A$1:$H$81,8,0)>=--"1/31/2008","x"," ")

Personally, I would use Null "" rather than Space " " as the alternative

Dave Peterson

I'd use a real date and an empty string:


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

Similar Threads