Subtracting dates?? AGRRRRRRRRR!!!

  • Thread starter Thread starter mcr1
  • Start date Start date
M

mcr1

I am subtracting 2 dates. To keep in simple, I am just subtracting th
dates in 2 cells as I am having trouble with datedif. Anyways, when
enter the formula, =sum(a1-a2), it does the trick, but, before I hav
entered the dates I want the difference in, it put a number like -3820
in the cell. How can I get Excel to just leave the cell blank until
enter a date? Once again, thanks in advance.

Miles Ree
 
Hi Miles,
=IF(AND(A1>0,A2>0),A2-A1,"")
Assuming the second date is the later date.
Note the above will be an empty string, it will not be an empty cell.
 
Back
Top