Formula Errors

How to Fix Excel INDEX and MATCH Returning the Wrong Row

Bushra ParveenBushra Parveen Nov 2, 2026 870 views

Question details

The user needs to correct an INDEX and MATCH formula that is pulling data from the wrong row when referencing a mix of structured table columns and entire worksheet columns.

How to Fix Excel INDEX and MATCH Returning the Wrong Row
Product
Microsoft Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Looking up and returning data using the INDEX and MATCH combination across regular cell ranges and structured tables.
Observed behavior
The formula returns a mismatched value because the starting row of a structured table column (which excludes headers) differs from a full column reference, causing a row offset.
Before you start

Review your formula to identify exactly which ranges the INDEX and MATCH functions are referencing. Pay close attention to whether you are mixing full column references (like A:A) with structured table columns (like Table1[Email]).

Solution 1Recommended

Match the Starting Rows of Lookup and Return Ranges

Ensure that both your INDEX range and MATCH range begin at the exact same row number to prevent offset errors.

The most common cause of INDEX and MATCH returning the wrong row is mismatched array sizes. If your INDEX array starts at row 1 (e.g., Sheet1!S:S) but your MATCH array starts at row 2 (e.g., Table1[Email]), the matched position will be off by one row.

1
Select the formula cell

Click on the cell containing the incorrect INDEX and MATCH formula to view it in the formula bar.

2
Check the INDEX array

Look at the first argument in the INDEX function (e.g., Sheet1!A2:A100). Note the starting row number.

3
Check the MATCH array

Look at the second argument in the MATCH function (e.g., Sheet1!B2:B100 or Table1[Email]).

4
Align the ranges

Adjust both ranges so they start and end at the same row number (e.g., both starting at row 2, or both referencing the entire column like A:A and B:B). Press Enter to apply.

Match the Starting Rows of Lookup and Return Ranges
Pro Tip: It is generally best practice to avoid full column references (like A:A) entirely to improve spreadsheet calculation performance. Use defined ranges instead.
Effortless Spreadsheet Formulas

Fix Formula Errors Easily with WPS Spreadsheet

WPS Office offers a highly compatible spreadsheet tool that seamlessly handles advanced formulas like INDEX and MATCH, structured tables, and complex lookups. It provides clear, color-coded formula syntax highlighting to help you spot range mismatches instantly.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the formula error.
  2. 2. Inspect the formula: Double-click the cell containing your INDEX MATCH formula.
  3. 3. Check color highlights: Use the color-coded boxes that appear around your data ranges to visually verify if the INDEX array and MATCH array align.
  4. 4. Adjust easily: Drag the borders of the highlighted boxes to align the starting rows, then press Enter.
Fully compatible with Microsoft Excel formulas, structured tables, and referencesIntuitive formula auditing tools with color-coded syntax to highlight mismatched rangesFree, lightweight, and fast performance for processing large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why does INDEX MATCH return #N/A even though the lookup value exists?

This usually happens due to mismatched data types (e.g., a number stored as text in one column and as a number in the other) or hidden trailing spaces in the cells. You can use the TRIM() function or ensure both columns have the exact same text/number formatting.

Can I use entire column references like A:A with structured tables?

Yes, but it is not recommended to mix them in the same formula. If your INDEX function uses A:A (starting at row 1) and your MATCH uses Table1[Column] (starting at row 2), the returned row numbers will be offset by the table's starting position.

Is XLOOKUP a better alternative to INDEX MATCH?

Yes, XLOOKUP is a modern, simpler alternative that combines the functionality of both functions without the risk of range offset errors. It requires you to select parallel arrays for lookup and return, naturally preventing the mismatched row issue.

How do I reference an entire structured table column including the header?

To include the header in a structured reference, use the syntax TableName[[#All],[ColumnName]]. This helps align the range if your INDEX function spans the entire column starting from row 1.