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.
You can use the following steps:
- 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.
- Convert Date to Number in Excel
- Convert Text to Date in Excel
- Create a Date Range in Excel
- Custom Date Formats in Excel
- DATEDIF Function in Excel
- Highlight Dates Between Two Dates in Excel
- Quickly Concatenate Two Dates in Excel
- Random Date Generator (Excel Formula)
- Combine Date and Time in Excel
⇠ Back to Excel Formulas List (Basic + Advanced)