Function Problems

How to Fill an Excel Cell Based on Two Drop-Down Selections

Steve KSteve K Nov 3, 2026 868 views

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.

How to Fill an Excel Cell Based on Two Drop-Down Selections
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.
Before you start

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.

Solution 1Recommended

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.

1
Create your mapping table

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.

2
Apply Data Validation

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.

3
Enter the XLOOKUP formula

In your target result cell, type =XLOOKUP(1, (Option1Range=DropDown1Cell)*(Option2Range=DropDown2Cell), ResultRange, "No match"). Replace the placeholder names with your actual cell references.

4
Press Enter to apply

Hit Enter to calculate the formula. The cell will now automatically update whenever you change either drop-down selection.

Use the XLOOKUP Function with Multiple Criteria
Formula Tip: Using the "No match" argument in XLOOKUP automatically handles errors if a user selects a combination that does not exist in your mapping table.
Advanced Spreadsheet Software

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. 1. Open your file: Launch WPS Office and open your data file in WPS Spreadsheet.
  2. 2. Create drop-down lists: Navigate to the Data tab and click the 'Validation' tool to set up your drop-down lists.
  3. 3. Insert your lookup formula: Use the built-in Insert Function (fx) tool to seamlessly construct your multi-criteria XLOOKUP or INDEX MATCH formula.
Fully compatible with Microsoft Excel formulas and .xlsx file formats.Includes a powerful suite of lookup and reference functions to populate cells instantly.Free and lightweight software with an intuitive, user-friendly interface.
microsoft office alternative - wps office

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.