Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Date comparison not working in Excel formula

If I put the date 31/12/2013 in A1 and another date 1/1/2014 in A2 then a formula like

 =A1<A2 

gives the expected result, TRUE.

If I put the formula

=A1<1/1/2014 

in another cell, it gives the result FALSE.

The question is how to adjust the second formula to make it give the correct result, and why it doesn't work as it stands.

I've been looking at this for a while and have found some related posts like

Comparing computed dates with entered dates

but not one which directly answers the question.

like image 260
Tom Sharpe Avatar asked Oct 09 '14 12:10

Tom Sharpe


1 Answers

1/1/2014 is 1 divided by 1 divided by 2014.

Instead; =A1<DATEVALUE("1/1/2014")

like image 141
Alex K. Avatar answered Oct 18 '22 23:10

Alex K.