This wikiHow teaches you how to find a date that comes before or after a test date in Microsoft Excel.
Step
Step 1. Open the spreadsheet containing the date entries
You can open it by double-clicking the file on your computer or running Microsoft Excel (in the folder Applications ” on a Mac computer, or segment “ All Apps ” in the “Start” menu on the PC) and select the desired spreadsheet.
Use this method to find out which date entries appear before or after the cut-off date you set in the column
Step 2. Click an empty box
Use the box in an unobtrusive position as this box is selected to enter the test date.
Step 3. Type in the date you want to compare with other dates
For example, if you want to search for date entries before January 1, 2018 in column B, type the formula 01-01-2018 in the box
Step 4. Click the empty box next to the first date entry in the column
For example, if the entries you want to check are in boxes B2 through B10, click the empty box in the next row (after the last column)
Step 5. Paste the “IF” formula in the box and press Enter key
In this example, suppose the first date entry in the list is in box B2, and the test date is added to box G2:
- =IF(B2>$G$2, "YES", "NO").
- If the date in box B2 arrives after the test date in box G2, the word “YES” will be displayed in the box.
- If the date in box B2 arrives before the test date in box G2, the word “NO” will be displayed in the box.
Step 6. Click the box containing the formula
The box will be selected afterwards.
Step 7. Drag the bottom right corner of the box to the last row on the sheet
Each box in the column (in this example, G) will be filled with a formula that compares each date entry in the data column (in this example B) with the test date.