View Single Post
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Your dates aren't really dates--they're text.

And excel will try to coerce anything that looks like a number (and a date is a
number) to a number when you use it in a calculation (a1-b1).

But it's comparing strings in that 3rd formula.


John Brown wrote:

Something's screwy. Two dates in different cells:

a1: 1/1/2003
b1: 10/29/2001

=a1-b1: 429
=b1-a1: -429
=if(a1<b1,1,0) 1

How can the last formula return a 1????


--

Dave Peterson