Function Problems

Excel VLOOKUP with a Table or Range Name Stored in a Cell

Huma Ashraf ChHuma Ashraf Ch Dec 2, 2026 869 views

Question details

Use a table or named range specified as text in a cell as the lookup array for VLOOKUP.

Use VLOOKUP with a Table or Range Name Stored in a Cell in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The lookup value, table or range name, and return-column number are stored in separate cells.
Observed behavior
VLOOKUP should use the name in the cell to select the lookup array and return a matching value.
Before you start

Check that the name in O10 matches an existing named range or table, that the lookup values are in its first column, and that P10 contains a valid column number.

Solution 1Recommended

Use INDIRECT to reference the name in VLOOKUP

Use this formula when O10 contains the name of the lookup range or table as text.

1
Check the lookup name

Enter the existing named range or table name in cell O10, such as SalesData. For a named range, check its definition under Formulas > Name Manager.

2
Enter the lookup formula

In the result cell, enter =VLOOKUP(G10,INDIRECT(O10),P10,FALSE). G10 contains the lookup value, and P10 contains the return-column number within the lookup array.

3
Check the result

Press Enter. If the formula returns an error, verify that the name in O10 exists, the value in G10 is in the first column of the lookup array, and P10 is within the array's column count.

Use INDIRECT to reference the name in VLOOKUP
INDIRECT limitations: INDIRECT can make formulas harder to maintain and cannot resolve references to closed external workbooks. FALSE requests an exact match.
WPS Spreadsheets solution

Use a Named Range in VLOOKUP with WPS Spreadsheets

In WPS Spreadsheets, use INDIRECT to turn a named range stored in a cell into the lookup array for VLOOKUP.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use File > Open to select your workbook.
  2. 2. Define the lookup range: Select the lookup data, then use Formulas > Define Name to give the range a name, such as SalesData.
  3. 3. Enter the inputs: Enter the lookup value in G10, the range name in O10, and the return-column number in P10.
  4. 4. Add the formula: In the result cell, enter =VLOOKUP(G10,INDIRECT(O10),P10,FALSE) and press Enter.
Choose a lookup range by changing its name in a cellUse exact-match VLOOKUP formulas for table lookupsOpen and edit Microsoft Excel XLS and XLSX filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does VLOOKUP need INDIRECT when the range name is in a cell?

O10 contains text, not a direct range reference. INDIRECT(O10) converts that text into a reference that VLOOKUP can use.

What does FALSE do in the formula?

FALSE tells VLOOKUP to look for an exact match for the value in G10 in the first column of the lookup array.

Why am I getting a #REF! error?

Check Formulas > Name Manager to confirm that the name in O10 exists, and make sure P10 does not exceed the number of columns in the lookup range. INDIRECT also cannot resolve a reference to a closed external workbook.

Can I change the lookup range without editing the formula?

Yes. Enter the name of another valid lookup range in O10. The formula will use that range, provided its first column contains the lookup values and P10 is a valid return-column number.