How to Compare Dates in Excel on PC or Mac

Table of contents:

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

With Microsoft Excel, it is very easy to compare (anteriority or posterity) dates with a given date.

Steps

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 that contains your dates

To do this, either you double click on the file and it is executed. Otherwise, first run Excel from the menu To start up, then All applications (Windows), or from the folder Applications (macOS) and you run the dates file.

This method is used to compare (prior or after) dates in separate cells

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

Step 2. Click on an empty cell

Choose a cell (which will receive the comparison date) away from the data already typed.

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

Step 3. Type the date you want to compare to other dates

  • You wanted to know which dates in column B are before 1er January 2018: then type in the 2018-01-01 cell.
Compare Dates in Excel on PC or Mac Step 4
Compare Dates in Excel on PC or Mac Step 4

Step 4. Click on an empty cell

You take whatever you want.

So you have dates in all the cells that go from B1 to B6, click on the empty cell that is just under the references date, another empty cell would have done the trick

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

Step 5. Paste the comparison formula

It begins with the IF attribute and continues in parentheses with the comparison operation, then the responses to be provided depending on the result. Once done, validate with the Enter key. In our example, the first date to compare is in cell B2, and the comparison date in G4.

  • Here, the formula is: = IF (B2> $ G $ 4, "YES", "NO").
  • If the date contained in B2 is later than that of G2, YES is displayed in the cell.
  • If the date contained in B2 is earlier than that of G2, NO is displayed in the cell.
Compare Dates in Excel on PC or Mac Step 6
Compare Dates in Excel on PC or Mac Step 6

Step 6. Click on the cell that contains the formula

The cell is thus selected.

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

Step 7. Expand the cell that contains the formula

In order to have an answer for each of the dates, click in the lower right corner of the cell with the formula, keep the mouse button pressed, then drag the cell down as many cells as there are dates to compare. These cells then contain the formula and make the comparison.

Popular by topic