How to compare dates if greater than another date in Excel?


If we want to compare a date in an excel sheet with all other dates available in the sheet, then manually doing this activity will be very tedious and time taking. For this activity, we can use a formula that may give the comparison in one shot. Let’s learn how to use this formula to compare the dates.

Compare Dates to Check if a Date is Greater than Another Date

Step 1 − Below is the sample data that we have taken for comparing the dates. In the first column, we have taken the dates with which comparison needs to be done and second column contains the date which will be compared with all the dates of column 1.

Step 2 − In the third column, we will enter the formula and display the result.

Step 3 − Now, enter the following formula in C2 cell and then drag the same till the row where comparison needs to be done.

Formula Syntax Description

Argument

Description

IF(logical_test, {value_if_true},{value_if_false}

  • Logical_test specifies the condition basis which the data needs to be rendered.

  • Value_if_true specifies the value that shall be returned if the condition satisfies.

  • Value_if_false specifies the value that shall be returned if the condition does not satisfy.

Step 4 − In the above screenshot, we have mentioned 21−Jan−22 in Date 2 column to compare with Date 1 column.

Step 5 − The result will be displayed in the form of ‘Greater’ or ‘Lesser’. Greater means if 21−Jan−22 is greater than the date mentioned in column Date 1 and ‘Lesser’ for those where the corresponding date is lesser than the date of column Date 1.

Conclusion

Hence the article has explained how to compare a date with other dates available in a datasheet. This formula can be useful to identify the age, expiry date etc. for the details available in any set of data. Keep exploring excel.

Updated on: 29-Dec-2022

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements