Excel dropdown VLOOKUP with AVERAGE, MAX, MIN

You are currently viewing Excel dropdown VLOOKUP with AVERAGE, MAX, MIN

In Excel, to find the maximum, minimum and average value in the range and return the corresponding value from another range, use the VLOOKUP formula with the AVERAGE, MAX and MIN functions.

VLOOKUP looks up the value in the left-most column of the source data and returns the corresponding value from the right column.

I have the following dataset. Now I want that when the user makes a selection from the dropdown (Area, Population) in F1, the program will calculate the maximum, minimum and average value in column A (Rank) depending on the selection and return the corresponding value from column B, like shown below:

VLOOKUP with AVERAGE, MAX, MIN calculator

To accomplish the task, I perform the following steps:

Convert both the source data into an Excel table separately. 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 both the tables. From the first table, select column A and B data and name it as area in the name box. Do the same for the second table and name it as population.

Use data validation to create category dropdown list in F1, listing area and population ranges. To do so, go to Data > Data Validation > Allow: List > Source: Area,Population

Using data validation to create dynamic dropdown list

To find the maximum value in column A depending on the selection from F1 and return the corresponding value from column B, construct the following formula in F2, like shown below:

=IFERROR(VLOOKUP(MAX(Table1[Rank]),INDIRECT(F1),2,FALSE),"")

Finding the maximum value and returning the corresponding value

To find the minimum value in column A depending on the selection from F1 and return the corresponding value from column B, construct the following formula in F3, like shown below:

=IFERROR(VLOOKUP(MIN(Table1[Rank]),INDIRECT(F1),2,FALSE),"")

Finding the minimum value and returning the corresponding value

To find the average value in column A depending on the selection from F1 and return the corresponding value from column B, construct the following formula in F4, like shown below:

=IFERROR(VLOOKUP(AVERAGE(Table1[Rank]),INDIRECT(F1),2,TRUE),"")

Finding the average value and returning the corresponding value

To replace the REF! error with an empty string "", nest all the formulas in the IFERROR function.

Your dropdown VLOOKUP with AVERAGE, MAX, MIN calculator is ready! I hope this post helped you.

Download Practice Workbook

Kunal

Hey, I am Kunal Aggarwal, the founder and author of Kunal Excel Tip based in New Delhi, India. I have completed my postgraduation from NIIT Limited, New Delhi in Excel course in 2019. Since then, I have been using and learning Microsoft Excel and started writing posts on the spreadsheet software here since March 2024.

Leave a Reply