Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Datedif Function??? | Excel Discussion (Misc queries) | |||
DATEDIF function | Excel Discussion (Misc queries) | |||
DATEDIF FUNCTION | Excel Worksheet Functions | |||
Help me find function Datedif | Excel Worksheet Functions | |||
Datedif function | Excel Discussion (Misc queries) |