为什么 Excel 不显示 DATEDIF() 的参数提示?

Why doesn't Excel display argument hints for DATEDIF()?

每当我在 Microsoft Excel 2013 中键入函数时,都会显示一个小提示框,其中列出了函数的参数。

由于某些原因,使用 DATEDIF() 时不会出现此提示框。我在公式选项卡上的任何地方都找不到它,也没有显示任何关于使用什么参数的提醒。 Excel 甚至不会在键入时自动完成公式名称。

Returns 11 月 15 日至 11 月 20 日之间的天数

公式输入后效果如预期,但当我需要记住参数时很难正确使用。

为什么 Excel 不显示 DATEDIF() 的参数提示?

DATEDIF 是 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.

一个建议是:UDF replacement for Excel's DATEDIF function

另请访问:

"DATEDIF" 函数起源于 "LOTUS 1-2-3",显然 Excel 提供它是出于兼容性目的。它从 Excel 5 开始可用,但 Excel 2000 是唯一在其帮助系统中记录它的版本。

该函数有 3 个参数:start_date、end_date 和一个表示感兴趣的时间单位的代码。为了示例的目的,我包括了单元格 A1 和 A2。替换您需要使用的单元格。

以下代码为例: =DATEDIF(A1, A2, "y") 您必须将代码括在引号中。

The following table 列出了 return 可用的代码。

"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.

注意,start_date 必须早于 end_date 否则函数将 return 出错。