Function Problems

How to Import Data Based on a Dropdown Selection in Excel

Camila MilosovichCamila Milosovich Nov 11, 2026 868 views

Question details

The user needs a scalable formula to import data from different sheets based on a dropdown selection, without manually updating the formula for every new addition.

How to Import Data Based on a Dropdown Selection in Excel
Product
Spreadsheets
Device & OS
not provided
Scenario
Managing a recipe workbook where a summary sheet dynamically pulls nutrition information based on the user's dropdown choice.
Observed behavior
The current approach uses a long IFS formula that hardcodes sheet names, making it difficult to maintain and requiring manual edits whenever a new recipe is added.
Before you start

Ensure all your recipe sheets or master data tables share a consistent layout so that formulas can reliably pull data from the same cell ranges regardless of the item selected.

Solution 1Recommended

Use a Master Lookup Table with XLOOKUP

Consolidating data into a single master sheet is the most scalable way to look up information dynamically.

Instead of keeping every recipe on a separate worksheet, maintain a central database. This eliminates the need for complex cross-sheet formulas and makes adding new recipes effortless.

1
Create a Master Data Sheet

Create a new sheet named 'MasterData'. List all recipe names in Column A, and their corresponding nutrition values in adjacent columns (e.g., Columns B through I).

2
Set Up Your Dropdown

On your main summary sheet, select cell B2, go to the Data tab, and use Data Validation to create a dropdown list referencing your recipe names.

3
Apply the XLOOKUP Formula

In the cell where you want the data to appear, enter the formula: =XLOOKUP(B2, MasterData!A:A, MasterData!B:I, ""). This searches for the selected recipe in Column A and returns the corresponding data array from Columns B through I.

4
Update Seamlessly

Whenever you add a new recipe, simply append it to the bottom of the 'MasterData' sheet. Your formula will automatically recognize the new entry without any manual edits.

Use a Master Lookup Table with XLOOKUP
Scalability: Using a master table approach ensures optimal spreadsheet performance and eliminates the maintenance nightmare of updating nested IFS formulas.
WPS Spreadsheet Solutions

Build Dynamic Lookup Tables with WPS Spreadsheet

WPS Spreadsheet offers full support for advanced lookup functions like XLOOKUP and INDIRECT, making it incredibly easy to pull and manage data dynamically from multiple worksheets.

  1. 1. Open Your Data: Launch WPS Spreadsheet and open your multi-sheet workbook.
  2. 2. Configure the Dropdown: Navigate to the 'Data' tab and click 'Validation' to easily set up your dynamic dropdown menu.
  3. 3. Apply the Function: Type =XLOOKUP( or =INDIRECT( in your target cell to seamlessly pull data based on the dropdown.
  4. 4. Automate Your Workflow: Press Enter. Your dashboard will now automatically refresh its data whenever a new selection is made.
Fully compatible with Microsoft Excel formulas and file formats (.xlsx).Built-in support for advanced functions like XLOOKUP, VLOOKUP, and INDIRECT.Intuitive Data Validation tools for creating seamless dropdown menus.Lightweight and fast, maintaining performance even with complex multi-sheet data lookups.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my INDIRECT formula returning a #REF! error?

A #REF! error with INDIRECT usually means the referenced sheet name does not exist, or the sheet name contains spaces and you forgot to wrap the reference in single quotes within your formula (e.g., INDIRECT("'" & B2 & "'!A1")).

Is it better to use XLOOKUP or INDIRECT for pulling data?

XLOOKUP combined with a centralized master data table is generally better because it is more scalable and robust. INDIRECT is a volatile function that recalculates on every workbook change, which can significantly slow down performance on larger files.

How do I automatically update my dropdown list when I add new items?

Format your list of recipe names as a Table (Ctrl+T or Insert > Table). Then, point your Data Validation dropdown to that specific table column. As you append new items to the table, your dropdown menu will expand dynamically.

Can I pull an entire array of data instead of a single cell using XLOOKUP?

Yes, XLOOKUP natively supports returning arrays. By selecting a multi-column range as your return array (for example, MasterData!B:I), the formula will automatically spill the retrieved data across multiple adjacent columns.