View Single Post
  #9   Report Post  
Fred Smith
 
Posts: n/a
Default

Hi Nick,

I agree there are problems when the second day is less than the first. There are
also problems going from Feb 28th to March 31st. As others have pointed out, you
can calculate the number of days properly, but calculating months and days is
always problematic. I wanted to show these formulas in case the OP had data
(like always starting at the first of the month) which would make them useful. I
assumed he/she would post back if other scenarios needed to be considered.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"Niek Otten" wrote in message
...
Hi Fred,

Just test with today (Jul 3 2005) and Dec 5 2004

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"Fred Smith" wrote in message
...
=(DAY(A1)-DAY(A2))&" days and "&(MONTH(A1)-MONTH(A2))&" months"

will get you the answer you are looking for.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"kasey" wrote in message
...
Thank you for your quick response. I unfortunately have tried that and it
doesn't work either. I even have some calculations that are within the same
day and the month will show up as 1, the day shows up as 0 (which is
should),
and the time calculation is correct. Thank you for your help!

"Andy" wrote:

Hi

Try formatting the result as General. This will give you 60 days. I don't
know how the answer can be '29 and one month'!

Andy.

"kasey" wrote in message
...
please help me in something
i have two cells:
31/10/2004 18:00
01/09/2004 07:00
i want to subtract the two cells
the result i am taking is 29/02/1900 11:00
but the correct result is 29 and one month
what can i do
thanks