In Excel, to calculate the sum of numeric values across multiple columns based on the selection of the dropdown list, I will use data validation to create dropdown list and use the SUM and VLOOKUP functions together.
VLOOKUP looks for the value in the vertical data and returns a value from the given column number.
The following dataset contains the number of cold drinks consumed:
![Dataset Dataset](https://kunalexceltip.com/wp-content/uploads/2024/03/Dataset-8.png)
Now I want the program to instantly calculate the sum of the cold drink selected from the dropdown list, like shown below:
![Calculating the sum across multiple columns based on the selection of the dropdown list Calculating the sum across multiple columns based on the selection of the dropdown list](https://kunalexceltip.com/wp-content/uploads/2024/03/Calculating-the-sum-across-multiple-columns-based-on-the-selection-of-the-dropdown-list.gif)
To accomplish the task, I perform the following steps:
I use data validation using the shortcut [Alt A V Enter] in sequence to create a dropdown list in H5, listing all the drink names in column A, like so:
![Using data validation to create dropdown Using data validation to create dropdown](https://kunalexceltip.com/wp-content/uploads/2024/03/Using-data-validation-to-create-dropdown-3.gif)
After creating the dropdown, I construct my SUM and VLOOKUP formula in H6, like shown below:
![Constructing SUM and VLOOKUP formula Constructing SUM and VLOOKUP formula](https://kunalexceltip.com/wp-content/uploads/2024/03/Constructing-SUM-and-VLOOKUP-formula.gif)
To replace the N/A error with an empty string "", I nest my entire formula in the IFNA function.
Your dropdown VLOOKUP and SUM formula is ready! I hope this post helped you.