DATEDIF returning #NAME?

Occasional Visitor

I'm using Microsoft Office 365.

I've discovered the DATEDIF formula in this forum, but it's not to working for me.

I've tried several variations and get the #NAME? error.

Examples: 

  • DATEDIF(AB2,AA4,D)
  • DATEDIF("11/09/2020","04/01/2021",D)
  • DATEDIF(AB2,"04/01/2021",D)
  • DATEDIF("11/09/2020",AA4,D)
1 Reply

@geneseesquire 

The first two arguments must be dates: references to cells containing dates, or expressions that evaluate to dates.

The third argument must be a string: text enclosed in quotes, or a reference to a cell containing a string, or an expression that evaluates to a string.

For example:

 

=DATEDIF(AB2,AA4,"D")

=DATEDIF(DATE(1984,1,1),TODAY(),"Y")