Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find the earliest or latest date base on criteria in Excel?

Let’s say, you have two columns of data which Column A contains the products, Column B includes date, and now, you want to find the earliest or latest date based on the criteria in Column A as following screenshot shown. How could you solve this problem quickly in Excel?

doc find earlest date with criteria 1

Find the earliest / latest date based on criteria with formulas

Find the earliest / latest date based on criteria with Kutools for Excel


Find the earliest / latest date based on criteria with formulas


In Excel, the following array formulas may help you to return the oldest or latest date with criteria, please do as follows:

To get the earliest date based on criteria:

1. Enter this formula: =MIN(IF($A$2:$A$16="Office Tab",$B$2:$B$16)) into a blank cell where you want to get the result, and then press Ctrl + Shift + Enter keys together to return the oldest date based on the criteria – Office Tab of Column A, and you will get a 5 digits number, See screenshot:

Tips: In this formula: A2:A16 is the data range contains the criteria that you based on, “Office Tab” is the criteria that you use, and B2:B16 includes the date that you want to return.

doc find earlest date with criteria 2

2. Then you should convert the 5 digits number to date format, please click Home, go to General drop down to choose the Short Date format , and the earliest date based on Office Tab has been displayed, see screenshot:

doc find earlest date with criteria 3

Note:

To get the latest date with the criteria, you can apply this array formula: =MAX(IF($A$2:$A$16="Office Tab",$B$2:$B$16)), and remember to press Ctrl + Shift + Enter keys together to get the correct result.


Find the earliest / latest date based on criteria with Kutools for Excel

Kutools for Excel’s Advanced Combine Rows feature can help you to get the earliest or latest date of each item in Column A without any formulas.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

If you have installed Kutools for Excel, please do as follows:

1. If you want to keep the original data, you can copy and paste the data to another range, and then select the pasted range that you want to use.

2. Then click Kutools > Content > Advanced Combine Rows, see screenshot:

doc find earlest date with criteria 4

3. In the Combine Rows Based on Column dialog box, please click the column name that you want to get the date based on, and then click Primary Key option, see screenshot:

doc find earlest date with criteria 5

4. Then click the date column that you want to return the latest or earliest date, and select Calculate > Max / Min, ( select Max to get the latest date and Min to return the oldest date), see screenshot:

doc find earlest date with criteria 6

Tips: If you check My data has headers, your header within the data range will be ignored automatically, to get the correct date format, please uncheck Use formatted values option.

5. Then click Ok button, the latest or oldest date base on each item has been returned as follows:

doc find earlest date with criteria 7  2 doc find earlest date with criteria 8

Click to Download and free trial Kutools for Excel Now!


Demo: Find the earliest / latest date based on criteria with Kutools for Excel

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.