Share via

#NUM! Answer to DATEDIF sum. Why?

Anonymous
2019-02-06T08:25:27+00:00

I have typed the following formula:

=DATEDIF(P2,Q2,"y") & " years, "  & DATEDIF(P2,Q2,"ym") & " months "

Where P2 is todays date, and O2 is the start date.

I can't see why I keep getting the answer of #NUM!

Can anyone shed some light for me?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2019-02-06T09:00:39+00:00

Hi,

The start date should be first in formula. So try this:

=DATEDIF(Q2,P2,"y") & " years, "  & DATEDIF(Q2,P2,"ym") & " months "

You can read about this function in this link: https://support.office.com/en-us/article/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c

Hope this helps. If yes, please mark my reply as Answer.

IlirU

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2019-02-06T09:03:26+00:00

    Hi Jason,

    DATEDIF(start_date,end_date,unit)

    If the Start_dateis greater than the End_date, the result will be #NUM!.

    Reference: DATEDIF function

    Make sure the start date is not greater than the end date. It works well by my side.

    Thanks,

    Rena

    Was this answer helpful?

    0 comments No comments