How to compare dates in Excel

You can watch a video tutorial here.

Calendar dates play a crucial role in any time series data. In Excel, dates are treated differently from numerical and text data. There are many ways to format dates as well as to use them in calculations. You may need to compare dates to find if a set of transactions occurred before or after a particular date. For example, if you are creating a sales offer that targets people of a certain age, you can compare their dates of birth with the cut-off date to determine if they are eligible. 

Step 1 – Check if one date is greater than or equal to the other

– Select the cell in which the result is to appear
– Type the formula using cell references:
= Date of birth >= &Cut-off date$
– Press Enter
Note: The ‘Cut-off date’ has to be made constant as the formula is going to be copied to other rows

Step 2 – Check if one date is lesser than the other

– Select the cell in which the result is to appear
– Type the formula using cell references:
= Date of birth < &Cut-off date$
– Press Enter
Note: The ‘Cut-off date’ has to be made constant as the formula is going to be copied to other rows

Step 3 – Copy the formula and check the result

– Using the fill handle from the first cell, drag the formula to the remaining cells
OR
a) Select the cell with the formula and press Ctrl+C or choose Copy from the context menu (right-click)
b) Select the rest of the cells in the column and press Ctrl+V or choose Paste from the context menu (right-click)
– Now you can identify those eligible for the sales offer