How to Fill an Excel Cell Based on Two Drop-Down Selections
Question details
The user wants to automatically populate a specific cell with a value based on the criteria selected from two different drop-down lists.

- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Building a dynamic form or dashboard where returning a specific result relies on two independent variable choices from drop-down menus.
- Observed behavior
- The user needs a formula setup that dynamically checks two conditions from drop-down lists and returns the corresponding value from a lookup table.
Ensure you have a master mapping table set up in your worksheet that lists all possible combinations of your two drop-down selections and their corresponding results.
Use the XLOOKUP Function with Multiple Criteria
The modern XLOOKUP function is the most efficient way to match multiple conditions simultaneously using boolean logic.
This method multiplies two logical arrays together. If both drop-down criteria match a row in your lookup table, the result is 1 (True). XLOOKUP searches for this '1' to return the correct value.
Set up a table with Column 1 for the first drop-down's options, Column 2 for the second drop-down's options, and Column 3 for the return values.
Select your input cells, go to the Data tab, choose Data Validation, and set the Allow type to 'List' to create your two drop-down menus.
In your target result cell, type =XLOOKUP(1, (Option1Range=DropDown1Cell)*(Option2Range=DropDown2Cell), ResultRange, "No match"). Replace the placeholder names with your actual cell references.
Hit Enter to calculate the formula. The cell will now automatically update whenever you change either drop-down selection.

Use INDEX and MATCH for Older Spreadsheet Versions
If you are using a version of Excel or a spreadsheet program that does not support XLOOKUP, INDEX and MATCH is the perfect alternative.
Use WPS Spreadsheet to Handle Complex Lookups
WPS Spreadsheet fully supports advanced array formulas and modern lookup functions like XLOOKUP, allowing you to easily build dynamic data models based on multiple drop-down lists.
- 1. Open your file: Launch WPS Office and open your data file in WPS Spreadsheet.
- 2. Create drop-down lists: Navigate to the Data tab and click the 'Validation' tool to set up your drop-down lists.
- 3. Insert your lookup formula: Use the built-in Insert Function (fx) tool to seamlessly construct your multi-criteria XLOOKUP or INDEX MATCH formula.

Frequently Asked Questions
Why does my multi-criteria lookup return a #VALUE! or #N/A error?
This usually happens if the range sizes in your formula do not match exactly. Ensure your Option1Range, Option2Range, and ResultRange all contain the exact same number of rows.
Can I add a third drop-down selection to this lookup formula?
Yes, you can easily extend the formula by adding another multiplication condition for the third drop-down. For example: =XLOOKUP(1, (Range1=Cell1)*(Range2=Cell2)*(Range3=Cell3), ResultRange).
Does this formula work with both text strings and numerical values?
Yes, XLOOKUP and INDEX MATCH can process text strings, dates, and numerical values seamlessly, as long as the data types in your drop-down match the data types in your lookup table.




