Unexpected value with date calculation

  • Thread starter Thread starter Bob@HP
  • Start date Start date
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
 
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?
 
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
 
That's one of the reasons why most experts on this group recommend avoiding
merged cells like the plague.
Glad you found the answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top