How to Compare Dates in Excel on PC or Mac Computer

Table of contents:

How to Compare Dates in Excel on PC or Mac Computer
How to Compare Dates in Excel on PC or Mac Computer

Video: How to Compare Dates in Excel on PC or Mac Computer

Video: How to Compare Dates in Excel on PC or Mac Computer
Video: How to Match Fonts from Images in Photoshop 2024, May
Anonim

This wikiHow teaches you how to find a date that comes before or after a test date in Microsoft Excel.

Step

Compare Dates in Excel on PC or Mac Step 1
Compare Dates in Excel on PC or Mac Step 1

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

Compare Dates in Excel on PC or Mac Step 2
Compare Dates in Excel on PC or Mac Step 2

Step 2. Click an empty box

Use the box in an unobtrusive position as this box is selected to enter the test date.

Compare Dates in Excel on PC or Mac Step 3
Compare Dates in Excel on PC or Mac Step 3

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

Compare Dates in Excel on PC or Mac Step 4
Compare Dates in Excel on PC or Mac Step 4

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)

Compare Dates in Excel on PC or Mac Step 5
Compare Dates in Excel on PC or Mac Step 5

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.
Compare Dates in Excel on PC or Mac Step 6
Compare Dates in Excel on PC or Mac Step 6

Step 6. Click the box containing the formula

The box will be selected afterwards.

Compare Dates in Excel on PC or Mac Step 7
Compare Dates in Excel on PC or Mac Step 7

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.

Recommended: