Share via

Calculating the difference between two dates

Anonymous
2023-04-20T12:40:08+00:00

Hello, i'm trying to do a simple calculation of the difference in days between two dates using (DATEDIF9N3,O3,''d'') However, this is not being recognised as a formula and I don't understand why. I keep getting a message saying there's a problem with the formula.

Alternatively, i'd like to use an IF formula so that if one date is greater than the other, 'deadline missed' is inserted. However, when I tried that standard formula it wouldn't recognise it either.

Many thanks

Microsoft 365 and Office | Excel | For business | 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
2023-04-20T13:16:54+00:00

=IF(O3<N3,"Missed",DATEDIF(N3,O3,"D"))

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2023-04-20T12:54:42+00:00

Hi Briony,

=DATEDIF(N3,O3,"d")

should work.

But you don't need DATEDIF.

=O3-N3

works too.

Claus

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-04-20T13:55:06+00:00

    Thanks so much. That's done the trick.

    Regards

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-04-20T13:08:57+00:00

    Thanks. I can't believe I forgot that simple way! Since I have you here, can you tell me how to do the formula to show that if column N is greater (a later date) than column O to put 'missed' in the column?

    thanks

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-04-20T12:56:23+00:00

    =DATEDIF(N3,O3,"D")

    Image

    It caused by you are using two ' instead of "

    Was this answer helpful?

    0 comments No comments