Unexpected value with date calculation

B

Bob@HP

b2 is set to =DATE(2007,6,9)
i5 is set to =DATE(2007,6,10)
h10's formula is =DATEDIF(I5,B2,"Y")

I'm expecting an answer of 0, but I get 107. The format of H10 is set to
general.

Any suggestions?

Thanks,

Bob
 
D

David Biddulph

With those values the answer would be #NUM! (not zero), as you would have a
date difference of *minus* 1 day.
If you are getting an answer of 107, it looks as if I5 has a value of zero.
Check again that you've got the right values in the right cells, and that
your H10 formula refers to the cells you think it refers to.
If you put =I5 in a cell and format to General do you see 39243? If you put
=i5-b2 and format to general, do you see 1?
 
T

Tyro

I get a #NUM error with those dates because the start date, 2007,6,10 is
greater than the end date 2007,6,9

Tyro
 
D

David Biddulph

That's one of the reasons why most experts on this group recommend avoiding
merged cells like the plague.
Glad you found the answer.
 
Top