Function Problems

Use Excel INDEX and MATCH to Select Regional Data Dynamically

Camila MilosovichCamila Milosovich Nov 18, 2026 870 views

Question details

Select the appropriate regional data set and return a value for a chosen section and age.

Use Excel INDEX and MATCH to Select Regional Data Dynamically
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains separate regional data ranges and selection cells for region, section, and age.
Observed behavior
The formula should select the region and return the value at the matching section and age.
Before you start

Arrange each regional data range with sections in the same row order and ages in the same column order. Identify the selection cells and assign a name to each regional data range using Formulas > Define Name.

Solution 1Recommended

Use a lookup table to select a named regional range

Use this method when region selections need to map to named ranges and section labels should be matched exactly.

This example uses B4 for the region, B3 for the section, and B5 for the age. Section labels are in A11:A16, age headers are in B10:F10, and every named region covers a data block with the same layout.

1
Name each region

Select each regional data block and choose Formulas > Define Name. For example, name B11:F16 Region_1 and I11:M16 Region_2.

2
Create the mapping table

In O3:P6, enter the region selections in column O and their corresponding range names as text in column P, such as Region_1.

3
Enter the formula

Select the result cell and enter =INDEX(INDIRECT(VLOOKUP($B$4,$O$3:$P$6,2,FALSE)),MATCH($B$3,$A$11:$A$16,0),MATCH($B$5,$B$10:$F$10,0)). Adjust the references to match your worksheet.

4
Test the selections

Change the region in B4, section in B3, and age in B5. Check that the result comes from the expected row and column of the selected region.

Use a lookup table to select a named regional range
Check exact matches: The region, section, and age selections must match their lookup entries. INDIRECT also requires the range name in column P to be valid.
WPS Spreadsheets

Look up regional data with WPS Spreadsheets

Use named ranges, a region mapping table, and INDEX with MATCH in WPS Spreadsheets to return the value for a selected region, section, and age.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Name the data blocks: Select each regional data block and use Formulas > Define Name to assign names such as Region_1 and Region_2.
  3. 3. Map regions to names: Enter region selections in O3:O6 and their corresponding range names as text in P3:P6.
  4. 4. Enter the lookup formula: In the result cell, enter =INDEX(INDIRECT(VLOOKUP($B$4,$O$3:$P$6,2,FALSE)),MATCH($B$3,$A$11:$A$16,0),MATCH($B$5,$B$10:$F$10,0)). Adjust the cell references for your workbook.
  5. 5. Test and save: Change the selections in B3, B4, and B5 to test the result, then use File > Save As to save the workbook as XLSX.
Select a regional data set dynamically with a lookup tableMatch section and age labels without manually finding the intersecting valueOpen and save Microsoft Excel XLSX filesWork with formulas in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the lookup formula return #N/A?

Check that B4 matches a region in O3:O6, B3 matches a section in A11:A16, and B5 matches an age in B10:F10. VLOOKUP and MATCH use exact matches in the example.

Why does INDIRECT return a reference error?

Check that the range name returned from column P is spelled correctly and exists under Formulas > Name Manager or Define Name. A misspelled or deleted name cannot be resolved.

Can I use sections with labels instead of numbers?

Yes. Use the lookup-table formula with MATCH($B$3,$A$11:$A$16,0) to find the section by its exact label rather than extracting a number with RIGHT.

What if my region number has more than one digit?

The reference-form example uses RIGHT(B4), which reads only the final character. Use the lookup-table method or revise the formula to extract the complete number.