logo
search
Function Problems

How to Find the Maximum and Minimum Value for Each Year in Excel

Huma Ashraf ChHuma Ashraf Ch Oct 19, 2026 868 views

Question details

The user wants to calculate the maximum and minimum values for specific years in a large dataset and retrieve the exact dates associated with those values.

How to Find the Maximum and Minimum Value for Each Year in Excel
Product
Excel
Device & OS
not provided
Scenario
Analyzing a large yearly dataset to find peak and lowest metrics along with their exact occurrence dates, while avoiding complex array formulas.
Observed behavior
The user needs to extract the max and min values per year and return their exact dates ensuring correct date formatting, as incorrect formats are causing the formulas to return 0.
Before you start

Ensure your dataset's date column contains valid Excel date-time values rather than text strings. If your dates are stored as text (e.g., '29.06.2018'), functions like MAXIFS and MINIFS will not recognize the year conditions and may return 0.

Solution 1Recommended

Use MAXIFS, MINIFS, and INDEX/MATCH to Find Yearly Extremes

This is the most efficient method to extract the maximum and minimum values for a specific year and accurately match their corresponding dates.

This approach uses the MAXIFS and MINIFS functions to filter data by year, replacing older and more complex array formulas. It relies on the DATE function to set the boundary criteria for the start and end of each year.

1
Set up your year headers

Create headers for your summary on a separate sheet or area. For example, enter the target year (e.g., 2018) in cell B1.

2
Calculate the maximum value

In cell B2, enter the formula: =MAXIFS(Sheet1!$B$2:$B$100000, Sheet1!$A$2:$A$100000, ">="&DATE(B1,1,1), Sheet1!$A$2:$A$100000, "<="&DATE(B1,12,31)). This checks the date column (A) against the first and last day of the year in B1, returning the highest value from column B.

3
Retrieve the associated date for the maximum value

In cell B3, enter the formula: =INDEX(Sheet1!$A$2:$A$100000, MATCH(B2, Sheet1!$B$2:$B$100000, 0)). This searches for the maximum value calculated in B2 and returns its corresponding date.

4
Calculate the minimum value

In cell B4, enter the formula: =MINIFS(Sheet1!$B$2:$B$100000, Sheet1!$A$2:$A$100000, ">="&DATE(B1,1,1), Sheet1!$A$2:$A$100000, "<="&DATE(B1,12,31)) to find the lowest value for that specific year.

5
Retrieve the associated date for the minimum value

In cell B5, enter the formula: =INDEX(Sheet1!$A$2:$A$100000, MATCH(B4, Sheet1!$B$2:$B$100000, 0)) to locate the date for the minimum value. You can then copy these formulas across multiple columns to calculate different years.

Use MAXIFS, MINIFS, and INDEX/MATCH to Find Yearly Extremes
Handling Duplicate Values: If duplicate maximum or minimum values exist in your dataset for the same year, the INDEX and MATCH combination will return the date of the very first matching value it finds.
Analyze Data Efficiently

Easily Find Max and Min Values with WPS Spreadsheet

WPS Office Spreadsheet fully supports advanced mathematical and lookup functions like MAXIFS, MINIFS, INDEX, and MATCH, allowing you to easily process and analyze large datasets without complex array formulas.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your existing workbook containing the date and value columns.
  2. 2. Verify date formats: Select your date column, right-click, choose 'Format Cells', and ensure it is formatted as a Date rather than General or Text.
  3. 3. Apply advanced functions: Enter the MAXIFS, MINIFS, and INDEX/MATCH formulas directly into your summary cells to instantly retrieve your yearly extremes.
100% compatible with Microsoft Excel formulas, functions, and file formats.Lightning-fast calculation processing for extremely large datasets.Built-in formatting tools to easily convert text to valid date values.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my MAXIFS and MINIFS formulas return a value of 0?

This usually happens when the dates in your dataset are formatted as text instead of valid Excel date values. You must convert text strings (like "29.06.2018") into proper date formats so the formulas can successfully evaluate the year boundary conditions.

Can I find the absolute maximum value without specifying a date range?

Yes. If you do not need to filter your data by specific years, you can bypass MAXIFS and simply use the standard =MAX(range) function to find the absolute highest value in your entire dataset.

What happens if there are multiple dates with the exact same maximum value?

When using the standard INDEX and MATCH combination to find the corresponding date of the highest value, the formula is designed to return the date associated with the very first instance it encounters reading from top to bottom.