Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Unexpected value with date calculation

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Unexpected value with date calculation

hi
try it this way,
=DATEDIF(B2,I5,"Y")

regards
FSt1

"Bob@HP" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Unexpected value with date calculation

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?
--
David Biddulph

"Bob@HP" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Unexpected value with date calculation

Thanks, found it - I had a merged cell with H10 and I10

"David Biddulph" wrote:

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?
--
David Biddulph

"Bob@HP" wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Unexpected value with date calculation

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

"Bob@HP" wrote in message
...
Thanks, found it - I had a merged cell with H10 and I10

"David Biddulph" wrote:

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?
--
David Biddulph

"Bob@HP" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Unexpected value with date calculation

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

"Bob@HP" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
End Date Calculation (adding a start date duration) Silena K-K Excel Discussion (Misc queries) 5 January 25th 08 04:27 PM
Date Calculation WLMPilot Excel Discussion (Misc queries) 4 December 19th 07 10:27 PM
calculation unexpected zxcv Excel Discussion (Misc queries) 7 July 13th 07 04:03 PM
Tricky Date calculation: How to calculate a future date [email protected] Excel Discussion (Misc queries) 9 August 11th 06 04:24 AM
Help please... Simple calculation - with unexpected results MLK Excel Worksheet Functions 7 July 29th 06 12:03 AM


All times are GMT +1. The time now is 05:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"