How to Compare Dates in Excel: Simple Formulas and Examples
How to Compare Dates in Excel: Simple Formulas and Examples. In Excel, you can easily compare two dates using a simple formula that returns a TRUE or FALSE result. You can also use the IF function to display a custom message in the result.
How to Compare Dates in Excel: Simple Formulas and Examples
To compare two dates, follow these steps:
- In a new cell, enter the equal sign (=).
- Refer to the first date cell (e.g., A1) using the equal sign (=) again.
- Enter the comparison operator (e.g., >, <, =).
- Refer to the second date cell (e.g., B1).
- Press Enter to get the result.
For example, “=A1=B1” compares the two dates in cells A1 and B1 for equality.
Here are a few examples to help you understand date comparison in Excel:
- To compare if one date is greater than another date, use the greater than operator (>) like this: “=A1>B1”.
- To compare a date with today’s date, use the TODAY function, which returns the current date. For example, “=A5=TODAY()” compares the date in cell A5 with today’s date.