ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Errors & fixes
  3. INDEX MATCH Not Working? 7 Causes and Fixes

INDEX MATCH Not Working? 7 Causes and Fixes

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

INDEX MATCH usually fails because MATCH is missing its 0 for an exact match, the INDEX and MATCH ranges don't start on the same row, or the lookup value and the data don't match exactly (text vs numbers, extra spaces). Write it as =INDEX(C2:C7,MATCH(E2,A2:A7,0)), with both ranges the same size, and lock them with $ before copying.

Key takeaways

  • Always end MATCH with 0 for an exact match; without it, MATCH guesses on unsorted data.
  • The INDEX range and the MATCH range must start and end on the same rows.
  • MATCH needs a single row or column, not a whole table.
  • The number 1004 and the text "1004" don't match; neither do "Ben" and "Ben ".
  • Lock both ranges with $ signs before you fill the formula down.
On this page+
  1. How INDEX MATCH works (and where it breaks)
  2. Cause 1: MATCH is missing the 0
  3. Cause 2: the ranges don't line up
  4. Cause 3: MATCH looks in more than one column
  5. Cause 4: numbers stored as text
  6. Cause 5: hidden spaces
  7. Cause 6: the ranges move when you copy the formula
  8. Cause 7: INDEX gets the whole table without a column number
  9. Practise it

When INDEX MATCH is not working, you usually see #N/A or, worse, a wrong answer with no error. The cause is almost always one of seven small things: a missing 0, ranges that don't line up, a 2D range in MATCH, text versus numbers, hidden spaces, unlocked ranges, or INDEX pointing at the whole table. This guide shows how to spot and fix each one.

How INDEX MATCH works (and where it breaks)#

INDEX MATCH is two functions working together. MATCH finds the position of a value in a list. INDEX returns the value at that position from another list.

Excel formula
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))

All the examples use this staff list in A1:C7:

ABC
1IDNameDept
21001AnaSales
31002BenIT
41003ChloeHR
51004DevIT
61005EmaFinance
71006FaridSales

=INDEX(C2:C7,MATCH(1004,A2:A7,0)) returns IT. MATCH finds 1004 in position 4 of A2:A7, and INDEX returns the 4th value of C2:C7. To test a broken formula, check MATCH on its own first: type =MATCH(1004,A2:A7,0) in a spare cell. If that fails, the problem is in MATCH. If it works, the problem is in INDEX. The INDEX MATCH guide covers the basics.

Cause 1: MATCH is missing the 0#

MATCH's third argument is the match type, and if you leave it out, it defaults to 1, an approximate match. Approximate match assumes the list is sorted and returns the nearest smaller value when there's no exact match.

Excel formula
=INDEX(C2:C7,MATCH(1007,A2:A7))

There's no employee 1007, but this returns Sales, Farid's department, because 1006 is the largest ID below 1007. Add the 0 and you get #N/A, which correctly tells you the ID doesn't exist:

Excel formula
=INDEX(C2:C7,MATCH(1007,A2:A7,0))

On unsorted data, approximate match can return a value from a random-looking row. The MATCH function guide explains the three match types.

Cause 2: the ranges don't line up#

INDEX counts positions from the top of its own range, so both ranges must start on the same row. If they don't, every result is shifted.

Excel formula
=INDEX(C3:C8,MATCH(1004,A2:A7,0))

MATCH still returns 4, but the 4th cell of C3:C8 is C6, so the result is Finance instead of IT. No error, just the wrong row. If the INDEX range is shorter than the position MATCH returns, you get #REF! instead.

Check that both ranges cover exactly the same rows, such as A2:A7 and C2:C7.

Cause 3: MATCH looks in more than one column#

MATCH only works on a single row or a single column. If you give it a whole table, it returns #N/A:

Excel formula
=MATCH(1004,A2:C7,0)

Point MATCH at the one column that holds the lookup values, here A2:A7. For a two-way lookup (row and column), use two MATCH functions inside INDEX: one for the row and one for the column.

Cause 4: numbers stored as text#

The number 1004 and the text "1004" look identical, but MATCH treats them as different values. This happens when IDs are imported from another system, or when the lookup cell is formatted as Text. Text numbers usually sit on the left of the cell.

The best fix is to convert the data to real numbers: select the column, click the warning icon and choose Convert to Number. If you can't change the data, convert the lookup value inside the formula instead:

  • Data is text, lookup value is a number: MATCH(E2&"",A2:A7,0) turns E2 into text.
  • Data is numbers, lookup value is text: MATCH(VALUE(E2),A2:A7,0) turns E2 into a number.

Cause 5: hidden spaces#

A trailing space makes "Ben " different from "Ben", so MATCH can't find it. Test a cell with =LEN(B3): "Ben" should return 3.

Clean the data with TRIM in a helper column, then paste the results back as values. Or trim the lookup value in the formula: MATCH(TRIM(E2),B2:B7,0). That only fixes spaces in the lookup value, not in the data, so cleaning the column is the better long-term fix.

If TRIM doesn't help, the space may be a non-breaking space, a special character often copied from web pages. TRIM can't remove it. Use SUBSTITUTE to replace it first: =TRIM(SUBSTITUTE(B3,CHAR(160)," ")). CHAR(160) is the code for the non-breaking space. After cleaning, the LEN check should return the length you expect.

Cause 6: the ranges move when you copy the formula#

If you fill INDEX MATCH down a column, unlocked ranges slide down with it. In the next row, A2:A7 becomes A3:A8 and the first record is no longer searched, so some lookups return #N/A.

Lock both ranges with $ signs and leave the lookup cell unlocked:

Excel formula
=INDEX($C$2:$C$7,MATCH(E2,$A$2:$A$7,0))

Select each range in the formula and press F4 to add the $ signs (Mac: ⌘T).

Cause 7: INDEX gets the whole table without a column number#

If the INDEX range has several columns, INDEX needs a column number too. =INDEX(A2:C7,MATCH(1004,A2:A7,0)) has no column number. In Microsoft 365, it spills the whole row (1004, Dev, IT) across three cells, and shows #SPILL! if those cells aren't empty. Older versions may show #VALUE! or an unexpected value.

Either give INDEX a single column, as in all the examples above, or add the column number: =INDEX(A2:C7,MATCH(1004,A2:A7,0),3) returns IT. The INDEX function guide explains the row and column arguments.

If you have Microsoft 365 or Excel 2021, XLOOKUP avoids several of these traps, because it defaults to an exact match and needs no position numbers. See INDEX MATCH vs XLOOKUP for a side-by-side comparison, and XLOOKUP not working if you switch and hit new errors.

Practise it#

Practise INDEX MATCH in a live spreadsheet: you'll build lookups that go left and right, and the sheet checks each formula as soon as you press Enter. Then fix broken formulas in the lookup errors lesson, which covers #N/A, wrong rows and text numbers. Try the exercise on this page first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Find the department for the employee ID in E2. Click F2 and type an INDEX MATCH that returns from C2:C7, matches in A2:A7, and uses 0 for an exact match. Press Enter.

fx
ABCDEFG
1
ID
Name
Dept
Find ID
Dept
2
1001
Ana
Sales
1005
3
1002
Ben
IT
4
1003
Chloe
HR
5
1004
Dev
IT
6
1005
Ema
Finance
7
1006
Farid
Sales
8
9
10

Tip: INDEX(what to return, MATCH(what to find, where to look, 0)).

Practise this in a lesson

LessonINDEX and MATCHCombine INDEX and MATCH to look up in any direction, including returning a column to the left of the one you search.LessonFixing lookup errorsDiagnose #N/A, #REF! and silent wrong answers in lookups, then handle missing items gracefully.Function guideINDEXLearn the Excel INDEX function: return a value by row and column position, build two-way lookups with MATCH, and practice live.Function guideMATCHLearn how Excel's MATCH finds the position of a value, why the 0 matters, and how it powers INDEX/MATCH. Includes a live exercise.

Frequently asked questions

Why is my INDEX MATCH returning #N/A?

+

MATCH couldn't find the lookup value. Check that the value really exists, that it's the same type (number or text) as the data, and that there are no extra spaces. Also make sure MATCH ends with 0.

Why does INDEX MATCH return the wrong value?

+

Usually the INDEX range and the MATCH range start on different rows, or MATCH is missing its 0 and is doing an approximate match. Line up the ranges and add 0 as the third argument of MATCH.

Why does INDEX MATCH work in one cell but not when copied?

+

The ranges weren't locked, so they shifted down as you copied. Use absolute references like $A$2:$A$7 and $C$2:$C$7.

Can INDEX MATCH look to the left?

+

Yes. The return range can be any column, left or right of the lookup column. That is one of its main advantages over VLOOKUP.

Sources

  • INDEX function - Microsoft Support
  • MATCH function - Microsoft Support
  • TRIM function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How INDEX MATCH works (and where it breaks)
  2. Cause 1: MATCH is missing the 0
  3. Cause 2: the ranges don't line up
  4. Cause 3: MATCH looks in more than one column
  5. Cause 4: numbers stored as text
  6. Cause 5: hidden spaces
  7. Cause 6: the ranges move when you copy the formula
  8. Cause 7: INDEX gets the whole table without a column number
  9. Practise it

Keep reading

Lookups· 6 min read

INDEX MATCH in Excel: The Beginner's Guide

INDEX MATCH is a lookup built from two functions. MATCH finds the position of a value in one column, and INDEX returns the item at that position from another column: =INDEX(A2:A9,MATCH(G2,B2:B9,0)). It can look left, it keeps working when columns are inserted, and it runs in every version of Excel.

Comparisons· 7 min read

VLOOKUP vs INDEX MATCH: Differences and When to Use Each

Use VLOOKUP for quick lookups to the right in a table that won't change shape. Use INDEX MATCH when you need to look left, when columns may be inserted, or when you want a two-way lookup. Both work in every version of Excel, so INDEX MATCH is the flexible choice when XLOOKUP isn't available.

Comparisons· 7 min read

INDEX MATCH vs XLOOKUP: Is INDEX MATCH Still Worth Learning?

Yes, INDEX MATCH is still worth learning. XLOOKUP is shorter and has a built-in "not found" message, so use it for new files when everyone has Excel 2021, Excel 2024 or Microsoft 365. INDEX MATCH works in every version, appears in many existing workbooks, and still comes up in interviews.

More on errors & fixes

  • #NAME? Error in Excel: Typos, Quotes and Missing Functions
  • #NUM! Error in Excel
  • Numbers Stored as Text in Excel: Find and Fix
  • "PivotTable Field Name Is Not Valid": How to Fix It
  • #REF! Error in Excel: What It Means and How to Fix It
  • Excel SUM Showing 0? Causes and Fixes
All errors & fixes articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free