Share via

Comparing dates in Excel

Anonymous
2020-08-26T18:03:02+00:00

Hello, I'm using the IF formula to compare dates in Excel but the results are not accurate.  The formula I used was =IF(I2>$T$2,"Yes","No") and the result should be Yes but it is returning No.  The cells are not in text format.  Any suggestions?  Your help is appreciated!

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

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-08-26T18:41:14+00:00

    The format may be correct looking, but it is possible that the value is still text. Formatting that is applies after entry is ignored for some text values.

    To check, format both I2 and T2 as a number - if their appearance changes (today's date will show as 44069 - then the date is correctly entered - if it does not change to a whole number, then re-format the two cells as date and re-enter both dates by selecting the cell, pressing F2, and hitting Enter or simply overwriting the cell with the date.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments