2

Whenever I type a function into Microsoft Excel 2013, a small hint box is displayed which lists the function's arguments.

Arguments for WEEKNUM()

For some reason, this hint box doesn't appear when using DATEDIF(). I can't find it listed anywhere on the formula tab, nor am I shown any reminder of what arguments to use. Excel won't even autocomplete the formula name while typing.

Missing hints for DATEDIF()

Returns number of days between Nov 15-Nov 20

The formula works as expected once entered, but it's difficult to use properly when I need to have the arguments memorized.

Why isn't Excel displaying argument hints for DATEDIF()?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225

2 Answers2

4

DATEDIF is an undocumented function in Excel

From Office Support:

Excel provides the DATEDIF function in order to support older workbooks from Lotus 1-2-3. The DATEDIF function may calculate incorrect results under certain scenarios.

From My Online Training Hub

For some reason Microsoft [doesn't] think the DATEDIF function is worthy of any documentation since Excel 2000. In fact they say they only include it in recent versions for backward compatibility.

From Happy LTD

Microsoft no longer supports this function in Excel. You can still use it, but you don’t get any help with it.

A suggestion is: UDF replacement for Excel's DATEDIF function

Also visit:

Community
  • 1
  • 1
3

The "DATEDIF" function has its origins in "LOTUS 1-2-3", and apparently Excel provides it for compatibility purposes. It has been available since Excel 5, but Excel 2000 is the only version that ever documented it in its Help system.

The function takes 3 arguments: start_date, end_date, and a code that represents the time unit of interest. I am including cells A1 & A2 for the purposes of the example. Substitute the cells you need to use.

The following code is an example: =DATEDIF(A1, A2, "y") You must enclose the code in quotation marks.

The following table lists the codes available with the returns.

"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 in days between the start_date and end_date. the months and years are ignored.

"ym" The difference in months between the start_date and end_date. the days and years are ignored.

"yd" The difference in days between the start_date and end_date. The years of the date are ignored.

NOTE, the start_date must be earlier than the end_date or the function will return an error.

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
wcm5407
  • 31
  • 1