Excel dropdown SUM, AVERAGE, MAX and MIN using INDIRECT

You are currently viewing Excel dropdown SUM, AVERAGE, MAX and MIN using INDIRECT

In Excel, to calculate sum and average and find the maximum and minimum value based on the selection of the drop-down list, I will use data validation, the SUM, AVERAGE, MAX and MIN functions and the INDIRECT function that returns a valid cell reference from the text string.

The following dataset contains the number of products by four companies:

Dataset

Now I want the program to calculate the sum and average and find the maximum and minimum value instantly when the user makes a selection of the company from the drop-down list, like shown below:

Calculating SUM, AVERAGE, MAX and MIN using INDIRECT

To do so, I use data validation using the shortcut [Alt A V Enter] in sequence to create a drop-down list in B11, listing company names, like shown below:

Creating drop-down list

Then, I create named range for each company, like so:

Creating named ranges

After this, I apply the SUM, AVERAGE, MAX and MIN functions and nest INDIRECT function in each one of them. Since I created named range for each company, INDIRECT will extract cell references from the selected dropdown value and will hand over those references to SUM, AVERAGE, MAX and MIN.

Applying the SUM, AVERAGE, MAX and MIN functions and nesting INDIRECT function in each one of them

Note that each formula returns the REF! error as B11 is empty at this time. To replace this error with an empty string (""), I nest each formula in the IFERROR function, like shown below:

Nesting each formula in the IFERROR function

Your dropdown SUM, AVERAGE, MAX and 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