count number of month function not working

B

Bosco Tsang

I am trying to set a formula to calculate the months backward from
todays, and the following function seems not working ...it will return
xx/xx/1900 00:00 as output,

=datedif(c6,today(),"m")

and I've also tested the following, none return normal,

=year(today()) returns xx/xx/1900 00:00
=year(c6) returns yy/yy/1904 00:00
(not the same date as in c6)

Is there something wrong with my version of Excel? I am using MS
Office 2000.

How can I set up the formula to count the number of months from a
starting date (in c6) to today?

Thanks,
Bosco.
 
J

J.E. McGimpsey

There's nothing wrong with your version. You just need to change to
format of the cell from Date to General or another Number format.

XL stores dates as offsets from a base date (31 December 1899), so
if the DateDif returns, say 30, then a date-formatted cell will
display 30 January 1900 if you're using the 1900 date system.
 
J

John Tjia

I know DATEDIF is a popular function in this group, but for what you
want, you may want to try DAYS360(startdate,enddate)/30. DAYS360
gives you the number of days between those two dates by assuming a
360-day year of 12 30-day months. Dividing it by 30 then gives you
the number of months.
 

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

Top