# If date in cell is greater than date in cell

Solved/Closed
Mel - Mar 4, 2010 at 08:46 PM
Posts
2888
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
August 16, 2022
- Nov 2, 2010 at 11:06 AM
Hello,

I am a beginner with formulas in Excel. I am working with dates formatted dd/mm/yyyy. I need a formula that will return a value of yes or no, if the date in cell A1 is before or after the date in cell B1.

Can someone help.

Thanks,
Mel
Related:

## 2 replies

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
769
Mar 5, 2010 at 03:47 AM
Use IF statement

'yes if date 1 is not equal to day 2
=IF(A1<>B1, "YES", "NO")

'to show you use of nested if
=IF(A1>B1, "YES, A1>B1, IF(A1=B1, "YES, A1=B1, "Default A1 < B1"))
I am using the formula to determine which deposit dates were late vs timely, and it is not calculating correctly. Can you help me determine why? Everything except for a blank E8 comes out "late".

=IF(E8>M8,"LATE",IF(E8=M8,"TIMELY",IF(E8<M8,"TIMELY")))