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)
3 Replies

@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")

@geneseesquire I know this thread is a bit older but I thought I would point out my mistake as I had the same exact issue.  In the formula I typed in "DATEIF" leaving off the "D" at the end of DATE.  "DATEDIF" is what needs to be typed.  

Thanks, this was exactly mine problem just now.