Function Problems

Auto-Fill Ingredient Quantities from an Excel Drop-Down

Bushra ParveenBushra Parveen Dec 2, 2026 868 views

Question details

Create a product selection form that lists ingredients and calculates their required quantities.

Auto-Fill Ingredient Quantities from an Excel Drop-Down
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user selects a product and enters a production volume to calculate ingredient quantities from stored percentages.
Observed behavior
The form should return the selected product's ingredients and multiply each percentage by the requested production volume.
Before you start

Arrange the source data with one row per product and ingredient, and enter percentages as numeric values such as 25%. Use the same unit for production volume and calculated ingredient quantities; the formula-based solution requires an Excel version that supports FILTER and dynamic arrays.

Solution 1Recommended

Use a Product Drop-Down and FILTER Formulas

Use this approach to automatically list matching ingredients and calculate their quantities when the product or production volume changes.

1
Set up the source table

Enter Product, Ingredient, and Percentage in A1:C1. Add one product-ingredient combination per row in A2:C100, with numeric percentages in column C.

2
Create a product list

In J2, enter =SORT(UNIQUE(FILTER(A2:A100,A2:A100<>"",""))) to create a list of distinct products. Leave the cells below J2 empty so the list can spill.

3
Add the drop-down

Select E2, open Data > Data Validation, choose List, and enter =$J$2# as the source. Select a product from the drop-down.

4
Enter production volume

Enter the requested production volume as a number in G2. Add headings such as Ingredient, Percentage, and Quantity in F4:H4.

5
Return ingredients and percentages

In F5, enter =FILTER(B2:B100,A2:A100=E2,""). In G5, enter =FILTER(C2:C100,A2:A100=E2,0). Keep the cells below both formulas empty.

6
Calculate quantities

In H5, enter =IF(F5#="","",G5#*$G$2). The results spill down alongside the ingredients and update when E2 or G2 changes.

Use a Product Drop-Down and FILTER Formulas
Check the recipe totals: Confirm that the percentages for each product add up to 100% if they represent a complete recipe. Expand the ranges in the formulas when your source data extends beyond row 100.
Create a production form in WPS

Calculate Ingredient Quantities in WPS Spreadsheets

Use a product list, a drop-down, and formulas in WPS Spreadsheets to build a production form. In a version that supports FILTER and dynamic arrays, the ingredient list and quantities can update automatically.

  1. 1. Prepare the recipe data: Open WPS Spreadsheets and enter Product, Ingredient, and Percentage in A1:C1, followed by one product-ingredient combination per row.
  2. 2. Create the selection list: In J2, enter =SORT(UNIQUE(FILTER(A2:A100,A2:A100<>"",""))). Select E2 and use Data > Data Validation to create a list from the product names in column J.
  3. 3. Enter the batch size: Choose a product in E2 and enter the production volume in G2.
  4. 4. Show ingredients and quantities: Enter =FILTER(B2:B100,A2:A100=E2,"") in F5, =FILTER(C2:C100,A2:A100=E2,0) in G5, and =IF(F5#="","",G5#*$G$2) in H5. Leave the cells below these formulas empty for the results.
Calculate ingredient quantities from a selected product and production volumeOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for data validation and formulasUpdate calculations when recipe percentages or production volumes change
microsoft office alternative - wps office

Frequently Asked Questions

How should I enter ingredient percentages?

Enter numeric percentages such as 25% in the Percentage column. If a recipe represents a complete mixture, check that its ingredient percentages add up to 100%.

Why does Excel show a #SPILL! error?

A dynamic-array formula needs empty cells for its results. Clear any contents below F5, G5, H5, or J2, then check the formula again.

What if my Excel version does not support FILTER?

Use a version of Excel that supports dynamic arrays, or build a manual ingredient list and use SUMIFS to retrieve percentages for the selected product and ingredient.

Can I add more products or ingredients?

Yes. Add a separate row for each product and ingredient in the source data. If the data extends beyond row 100, update the A2:A100, B2:B100, and C2:C100 ranges in the formulas.