LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default =DATEDIF(3/31/2006,4/30/2006,"m") equals 0?

G'day all,

I have an interest in solving a DATEDIF problem similar to Daves, so have
been watching this thread with interest.

After trying the various suggestions I'm rather confused. I got the
following results (remembering that we use the date format dd/mm/yyyy):

Tom's suggestion -

=DATEDIF(DATEVALUE("31/03/2006"),DATEVALUE("30/04/2006"),"m") = 0

=DATEDIF(DATEVALUE("31/03/2006"),DATEVALUE("31/05/2006"),"m") = 2

Biff's suggestion -

=DATEDIF("31/03/2006","30/04/2006","m") = 0

=DATEDIF("31/03/2006","31/05/2006","m") = 2

Roger's suggestion -

With 31/03/2006 in A1 and 30/04/2006 in B1 -

=DATEDIF(A1,B1,"m")+(DAY(A1)DAY(B1)) = 1

With 31/03/2006 in A1 and 31/05/2006 in B1 -

=DATEDIF(A1,B1,"m")+(DAY(A1)DAY(B1)) = 2

To my way of thinking, Roger's solution is the only one that returns the
correct result in both situations.

Any comments, suggestions, etc.?

Regards,

John

"Roger Govier" wrote in message news:...
Hi Dave

Slightly easier when dates are in cells
=DATEDIF(A1,B1,"m")+(DAY(A1)DAY(B1))

--
Regards

Roger Govier


"Dave F" wrote in message
...
How does that work?

=DATEDIF(3/31/2006,5/31/2006,"m") = 2

How can I get Excel to count exactly one month between the dates
3/31/2006
and 4/30/2006, or between 4/30/2006 and 5/31/2006, etc.?

Dave


--
Brevity is the soul of wit.




 
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
add one cell with no equals operator reggie26t Excel Discussion (Misc queries) 1 January 24th 06 02:57 PM
if a:a (range) equals january and c:c equals gas then add g:g ($) BCOz Excel Worksheet Functions 4 December 29th 05 07:40 PM
how to run a macro when a calculation equals a certin number Kevin Jones Excel Worksheet Functions 0 October 25th 05 09:23 PM
Apostrophes instead of equals in Excel ARH Excel Worksheet Functions 3 August 20th 05 12:18 AM
custom filter does not work when selecting 'equals' X AND 'equals' plindman Excel Discussion (Misc queries) 1 June 1st 05 11:29 PM


All times are GMT +1. The time now is 05:57 PM.

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"