DATEDIF() The hidden function - You may find it useful.

D

Dave Thomas

There is a mostly undocumented function in Excel called DATEDIF. Microsoft
documented it only in Excel 2000. It comes from Lotus 1-2-3.
It does not appear in the list of functions. You must manually type it in.
Its format is =DATEDIF(start_date,end_date,"F"). Note that start_date must
be less or equal to end_date or you will get a #NUM error.
F must be in quotes and may be the following:

"y" The number of complete years in the period
"m" The number of complete months in the period
"d" The number of days in the period.
"md" The difference between the days in start_date and
end_date. The months and years of the dates are ignored.
"ym" The difference between the months in start_date and
end_date. The days and years of the dates are ignored.
"yd" The difference between the days in start_date and
end_date. The years of the dates are ignored.

So if cell A1 has 11/19/04 and cell A2 has 06/30/05 then
=DATEDIF(A1,A2,"m") would return 7, the number of whole months difference
between those dates.
 

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

Similar Threads


Top