In Excel, to find the maximum, minimum and average value in the range and return the corresponding value from another range, use the INDEX MATCH formula with the AVERAGE, MAX and MIN functions.
The INDEX MATCH formula is used to look up the value in any column of the source data and return the corresponding value from the left column.
I have the following dataset. Now I want that when the user makes a selection from the dropdown (Area, Population) in B12, the program will calculate the maximum, minimum and average value in column B or C depending on the selection and return the corresponding value from column A, like shown below:
![Calculating the maximum, minimum and average value depending on the selection and returning the corresponding value Calculating the maximum, minimum and average value depending on the selection and returning the corresponding value](https://kunalexceltip.com/wp-content/uploads/2024/03/Calculating-the-maximum-minimum-and-average-value-depending-on-the-selection-and-returning-the-corresponding-value.gif)
To accomplish the task, I perform the following steps:
Convert the source data into an Excel table and name it as data. To do so, select the source data range (including the headers), go to the Insert tab and click on the Table button.
Create named ranges separately for the Area range and Population range. Select the Area range and name it as area in the name box. Similarly, select the Population range and name it as population.
Use data validation to create category dropdown list in B12, listing area and population ranges. To do so, go to Data > Data Validation > Allow: List > Source: =$B$2:$C$2
![Using data validation to create dynamic dropdown list Using data validation to create dynamic dropdown list](https://kunalexceltip.com/wp-content/uploads/2024/03/Using-data-validation-to-create-dynamic-dropdown-list-3.png)
To find the maximum value in column B or C depending on the selection from B12 and return the corresponding value from column A, construct the following formula in B13, like shown below:
![Finding the maximum value and returning the corresponding value Finding the maximum value and returning the corresponding value](https://kunalexceltip.com/wp-content/uploads/2024/03/Finding-the-maximum-value-and-returning-the-corresponding-value.gif)
To find the minimum value in column B or C depending on the selection from B12 and return the corresponding value from column A, construct the following formula in B14, like shown below:
![Finding the minimum value and returning the corresponding value Finding the minimum value and returning the corresponding value](https://kunalexceltip.com/wp-content/uploads/2024/03/Finding-the-minimum-value-and-returning-the-corresponding-value.gif)
To find the average value in column B or C depending on the selection from B12 and return the corresponding value from column A, construct the following formula in B15, like shown below:
![Finding the average value and returning the corresponding value Finding the average value and returning the corresponding value](https://kunalexceltip.com/wp-content/uploads/2024/03/Finding-the-average-value-and-returning-the-corresponding-value.gif)
To replace the REF! error with an empty string "", nest all the formulas in the IFERROR function.
Your dropdown INDEX MATCH with AVERAGE, MAX, MIN calculator is ready! I hope this post helped you.