Note: The other languages of the website are Google-translated. Back to English

Excel Formula: Find Earliest Date and Latest Date for Each Group

doc convert date to julia 1

In this tutorial, it provides formulas to find the earliest date and latest date for each group in Excel.

If you want to follow along with this tutorial, please download the example spreadsheet.
doc convert date to julia 1

Generic formula:

Find the earliest date of each group


Find the latest date of each group


Syntaxt and Arguments

Group_rng: the cell range that contains all group names.
Group: the group whose earliest date and latest date you want to find out.
StartD_rng: the cell range that contains all starting dates of the groups.

Return Value

The formulas return a date as a numeric value. Since the date is stored as number in Excel, to directly view the date, you can format the numeric value in a date format as you need after using the formula.

How this formula works

Here is a table, column B3:B8 contains department names, column C3:C8 contains the different project names in the departments, column D3:D8 is the start dates of each project, and the end dates of each group are in column E3:E8. For finding the earliest starting date and latest ending date from each department (A and B), please use below formula:

Find the earliest date


Press Shift + Ctrl + Enter keys to get the correct array result.
doc convert date to julia 1 

Then drag the auto fill handle down to cells which need this formula.
doc convert date to julia 1

Then keep the formula cells selected, press Ctrl +1 to display the Format Cells dialog, then under Number tab, click at Date in the Category list, then select one type of date from right Type section.
doc convert date to julia 1

Click OK, now the results are displayed as dates.
doc convert date to julia 1

Find the latest date for each department


Press Shift + Ctrl + Enter keys, drag fill handle to apply the array formula to other cells as need, and format the cells as dates.
doc convert date to julia 1


IF function: tests for a specific condition.

In the array formula {IF($B$3:$B$9=B11,$D$3:$D$8)}, it returns

MIN function: to find the minimum value in a range or an array.

={MIN (IF($B$3:$B$8=B11,$D$3:$D$8))}

MAX function: to find the largest value in a range or an array.



If you are using Excel 2019 or Excel 365, you can use the MINIFS and MAXIFS functions to quickly find the earliest and latest dates of each group.

Generic Formula

Find earliest date for group


Find latest date for group


Use the below formulas with above example:


Relative Formulas

Relative Functions

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet

Follow Us

Copyright © 2009 - | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL