In Excel, you can compare two dates by using a simple and quick formula that can return TRUE or FALSE in the result.
Or you can also use the IF function to get the custom message in the result while comparing two dates.
In the following example, we have two different dates in cells A1 and B1.
- First, enter the “=” equal sign in cell C1.
- Now refer to cell A1 where you have the first date.
- Next, enter the “=” equal sign again.
- After that, refer to cell B1 where you have the second date.
- In the end, hit enter.
Further in this tutorial, we are going to look at a few different examples to understand it.
Compare IF a Date is Greater than Another Date
In the following example, we have compared the first date with the second, if the first date is greater than the second date.
In the formula, we have used the greater than operator to do this.
Compare a Date with Today’s Date
In the same way, if you want to compare a date with today’s date you can use the TODAY function.
In the following example, we have used the TODAY function and then compare it to another date.
More on Date-Time Formulas
Add Minutes to Time | Add Month to a Date | Add Years to Date | Add-Subtract Week from a Date | Calculate Age using Date of Birth | Change Time Format | Convert Date to Number | Create a Date Range | DATEDIF Function | Get Day Number of Year | Get Month from a Date | Get Quarter from a Date | Get Years of Service | Calculate Time Difference Between Two Times | Get Day Name from a Date | Get End of the Month Date | Get Total Days in Month | Highlight Dates Between Two Dates | Military Time (Get and Subtract)