Date within a IF statement

Microsoft Excel 010 - complete package
July 22, 2011 at 11:50:38
Specs: Windows 7, 2

I am trying to include a formula that says..... if the date in A1 is less than 1/31/2012 then put a 1 if not, put a zero but when I try to do that it isn't recognizing 1/31/2012 as a date. It converts it to a number. Any help would be appreciated!

See More: Date within a IF statement

July 22, 2011 at 19:52:45
You didn't post your formula so it's a little hard for us to point out your "error", if there is indeed one.

The best we can do is suggest how we might construct the formula.

=IF(A1<DATEVALUE("1/31/2012"), 1, 0)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

July 24, 2011 at 09:54:52
check to see what the formatting for the cell is a date format. There is a possibility that you are looking at Microsofts date value.

also check your system variables in your operating system so see how your date is set up.


In the US it tends to be Month/day/year

Report •
Related Solutions

Ask Question