DATEDIF returning #NAME?

%3CLINGO-SUB%20id%3D%22lingo-sub-1869125%22%20slang%3D%22en-US%22%3EDATEDIF%20returning%20%23NAME%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1869125%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20using%20Microsoft%20Office%20365.%3C%2FP%3E%3CP%3EI've%20discovered%20the%20DATEDIF%20formula%20in%20this%20forum%2C%20but%20it's%20not%20to%20working%20for%20me.%3C%2FP%3E%3CP%3EI've%20tried%20several%20variations%20and%20get%20the%20%23NAME%3F%20error.%3C%2FP%3E%3CP%3EExamples%3A%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EDATEDIF(AB2%2CAA4%2CD)%3C%2FLI%3E%3CLI%3EDATEDIF(%2211%2F09%2F2020%22%2C%2204%2F01%2F2021%22%2CD)%3C%2FLI%3E%3CLI%3EDATEDIF(AB2%2C%2204%2F01%2F2021%22%2CD)%3C%2FLI%3E%3CLI%3EDATEDIF(%2211%2F09%2F2020%22%2CAA4%2CD)%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1869125%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
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
Highlighted

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