Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default DATEDIF() The hidden function - You may find it useful.

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.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default DATEDIF() The hidden function - You may find it useful.

Chip Pearson has thorough coverage of the DATEDIF function as his website:
http://www.cpearson.com/excel/datedif.htm

***********
Regards,
Ron

XL2002, WinXP


"Dave Thomas" wrote:

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.



Reply
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
Datedif Function??? FARAZ QURESHI Excel Discussion (Misc queries) 3 May 29th 07 04:41 AM
DATEDIF function mathew Excel Discussion (Misc queries) 5 February 23rd 07 08:45 PM
DATEDIF FUNCTION JT Excel Worksheet Functions 3 November 29th 06 04:27 PM
Help me find function Datedif ViestaWu Excel Worksheet Functions 4 August 21st 06 10:44 AM
Datedif function shaji Excel Discussion (Misc queries) 2 May 13th 06 02:36 PM


All times are GMT +1. The time now is 08:21 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"