Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add one cell with no equals operator | Excel Discussion (Misc queries) | |||
if a:a (range) equals january and c:c equals gas then add g:g ($) | Excel Worksheet Functions | |||
how to run a macro when a calculation equals a certin number | Excel Worksheet Functions | |||
Apostrophes instead of equals in Excel | Excel Worksheet Functions | |||
custom filter does not work when selecting 'equals' X AND 'equals' | Excel Discussion (Misc queries) |