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.
I can answer my own question now.
The answer as mentioned in related posts is to use the DATE or DATEVALUE functions i.e.
or
The reason it doesn't work is that in this context Excel just sees 1/1/2014 as an arithmetic expression, one divided by one divided by 2014 which is a small number. Dates (number of days since 1/1/1900) generally evaluate to large numbers so the comparison fails.
If you just type 1/1/2014 into a cell you get a date, but if you type =1/1/2014 you get a small number.
I just thought it was interesting to share because to a human =A1<1/1/2014 looks as if it's comparing a cell with a date, but it isn't.
1/1/2014
is 1divided
by 1divided
by 2014.Instead;
=A1<DATEVALUE("1/1/2014")