If Excel MATCH is not working, first force an exact match by setting the third argument to 0, then check that the lookup value and lookup range contain the same kind of data. With the value to find in E2 and a one-column list in A2:A100, use =MATCH(E2,A2:A100,0); it returns the value’s position in that range, or #N/A if Excel cannot find an exact match.
What MATCH does—and what its result means
MATCH searches a one-dimensional row or column and returns a relative position, not the matching value itself. If the fourth item in A2:A100 matches E2, the result is 4, even though the matching cell is A5. This distinction is a frequent source of confusion: MATCH reports where an item is within the selected range, not its worksheet row number.
For example, with A2:A5 containing Red, Blue, Green, Blue and E2 containing Blue, the exact-match formula =MATCH(E2,A2:A5,0) returns 2. MATCH finds the first occurrence, so it does not return 4 for the second Blue. If you need the value from a neighboring column, combine MATCH with INDEX; the lookup and return ranges must line up.
With names in A2:A5, corresponding prices in B2:B5, and the requested name in E2, =INDEX(B2:B5,MATCH(E2,A2:A5,0)) returns the price on the first matching row. This works because MATCH supplies a position relative to A2:A5, and INDEX uses that same position in B2:B5. MATCH itself is not case-sensitive, so Blue and BLUE count as a match.
Check the match mode first
The third argument, called match_type, changes how MATCH searches. If you omit it, Excel uses 1—not exact matching. That default can produce a plausible but incorrect result, or an error, when the list is not sorted as required. For most ordinary lookups, explicitly use 0.
- 0: Finds the first exact match. The lookup range does not need to be sorted.
- 1 or omitted: Finds the largest value less than or equal to the lookup value. The range must be sorted in ascending order.
- -1: Finds the smallest value greater than or equal to the lookup value. The range must be sorted in descending order.
Approximate matching is useful for thresholds, such as assigning a rate based on a score band, but it is not a safer version of exact matching. Suppose A2:A6 contains 0, 25, 50, 75, 100 in ascending order and E2 contains 68. With that layout, =MATCH(E2,A2:A6,1) returns 3: the position of 50, the largest value not greater than 68. If the values are unsorted, the result cannot be relied on. Choose the mode based on the task, and verify the required sort order whenever using 1 or -1.
Look for numbers stored as text and other type mismatches
A cell can look like a number while containing text. For example, a cell may contain the text “104” while the lookup list contains the numeric value 104. They can display identically but fail an exact MATCH. Formatting a text value as Number does not necessarily convert the underlying content; the cell’s stored value matters.
With a numeric-text lookup value in E2 and genuine numbers in A2:A10, =MATCH(VALUE(E2),A2:A10,0) converts E2 to a number before searching. If 104 is the third item in A2:A10, this returns 3. VALUE is appropriate only when the lookup text represents a number Excel can interpret; it can return an error for words or incompatible text. If the list contains text numbers instead, convert the list consistently or use a helper column rather than repeatedly coercing data in a complicated lookup.
Be careful with identifiers such as postal codes, product codes, and account numbers. A code like 00104 may need its leading zeros, so converting it to a number changes its meaning. Treat both the lookup value and the list as text in that case. Check the source data, not just the number format shown on the Home tab.
Remove spaces and invisible characters
Extra spaces are another common reason an apparent match fails. “Blue” and “Blue ” are different text strings for an exact lookup. Data copied from websites or other systems can also contain nonbreaking spaces, which look like ordinary spaces but are not removed by every cleanup method. Line breaks and other nonprinting characters may create similar surprises.
Inspect suspicious cells in the formula bar, compare their lengths, and test a cleaned copy in a helper column. TRIM removes leading and trailing ordinary spaces and reduces repeated spaces between words, but it does not remove every invisible character. CLEAN removes many nonprinting characters; it does not remove nonbreaking spaces. For data known to contain character 160, a helper formula can replace it before trimming.
With the suspect text in A2, =TRIM(SUBSTITUTE(A2,CHAR(160)," ")) replaces nonbreaking spaces with ordinary spaces and then trims the result. Fill that formula down the helper column, then run MATCH against the cleaned values. This is often easier to audit than embedding several cleanup steps in the lookup formula. If the original source has inconsistent punctuation or spelling, whitespace cleanup will not make those values equivalent.
Confirm the range, dimensions, and references
MATCH needs a single row or a single column as its lookup_array. A two-dimensional block such as A2:C20 is not a valid search array for MATCH; select one column or one row. Also make sure the lookup range includes the expected item. If the list grew after a formula was copied, a fixed range ending at row 100 will not search newly added values below that row.
Check whether the lookup value points to the intended cell, particularly after copying a formula. Relative references move when filled down or across. If every row should search the same list, lock that range with dollar signs. With each lookup value in E2:E10 and the shared list in A2:A100, enter this in F2 and fill down: =MATCH(E2,$A$2:$A$100,0). The range stays fixed while E2 changes to E3, E4, and so on.
When a formula reports #REF!, inspect its references for deleted rows, columns, or cells. A #VALUE! error can point to an invalid array shape or another issue in the formula’s inputs. Parentheses and separators matter too: in standard English-language Excel formula syntax, arguments are separated by commas. Some regional settings use semicolons instead, so follow the separator Excel accepts in that installation.
Use errors to narrow down the cause
#N/A usually means there is no match under the selected mode, but it does not tell you why. Check the match mode, data type, hidden spaces, spelling, and range boundaries in that order. If the formula is nested in INDEX, test MATCH by itself first. That separates a search problem from an incorrect return range or a separate INDEX issue.
IFERROR can make a finished report easier to read, but it should not be the first troubleshooting step. With E2 as the lookup value and A2:A100 as the list, =IFERROR(MATCH(E2,A2:A100,0),"Not found") displays Not found for any error in the expression. That also hides errors other than a genuinely missing item, so use it only after confirming the formula. During diagnosis, the plain MATCH result often provides more useful information.
A useful manual check is to select a candidate cell in the list and compare it with the lookup value directly. Check the formula bar and, if needed, use helper columns to normalize both sides in the same way. Avoid changing the match mode simply to make an error disappear: an approximate match may return a position even though the exact item is absent.
Consider XMATCH or a different lookup approach
XMATCH is a newer alternative available in Microsoft 365 and Excel 2021 or later. Unlike MATCH, XMATCH defaults to exact matching and offers additional search options. With E2 as the lookup value and A2:A100 as the list, =XMATCH(E2,A2:A100) returns the exact item’s position, or #N/A if it is absent. That default can prevent the omitted-match-type mistake, but it cannot fix inconsistent data, the wrong range, or a misspelled value.
For a formula that should return a related value, XLOOKUP may be simpler in Microsoft 365 and Excel 2021 or later. It can search one range and return a corresponding value from another; its default match behavior is exact. INDEX with MATCH remains useful when maintaining workbooks for older Excel versions or when you want the position separately. These functions do not remove the need to check that the lookup and return ranges correspond row for row.
There is no separate charge for using MATCH in Excel; it is a built-in worksheet function. The practical limitation is compatibility: newer functions such as XMATCH and XLOOKUP are not available in every older Excel release. If a workbook must be opened in an older version, confirm that version supports the functions used before sharing it.
Frequently Asked Questions
Why does Excel MATCH return #N/A when the value is visible?
It may be text in one place and a number in the other, contain an extra or nonbreaking space, or fall outside the selected range. Also confirm that the formula uses 0 for an exact match and that the visible characters really are identical.
Does MATCH return the worksheet row number?
No. It returns the position within the lookup range. If the matching cell is the fourth cell in A2:A100, MATCH returns 4, even though that cell is in worksheet row 5.
Is MATCH case-sensitive?
No. Standard MATCH treats uppercase and lowercase versions of the same text as equal. If a task truly requires case-sensitive matching, use a different approach, such as a formula built around EXACT, rather than expecting MATCH to distinguish capitalization.
Why does MATCH find the wrong value?
Check whether match_type is omitted or set to 1, which performs an approximate lookup and requires ascending sort order. For exact lookups, set the third argument to 0. Also remember that duplicate exact values return the position of the first occurrence.
Can MATCH search for part of a text value?
Yes. With match_type set to 0, MATCH supports the wildcards * for any sequence of characters and ? for one character. A tilde (~) escapes a wildcard when you want to search for the literal character. Wildcards apply to text searches, so use them deliberately when the lookup value may contain those symbols.
A reliable troubleshooting order
Start with an exact-match formula, test MATCH on its own, and confirm that its one-dimensional range includes the expected item. Then compare the underlying values for text-versus-number differences, extra spaces, and inconsistent identifiers. Only after the exact lookup works should you add INDEX, error handling, or other report logic. This sequence makes it easier to find the real cause instead of masking it with an approximate result or a generic message.
Related
- How to Insert a Leader Line in Microsoft Word
- How to Insert a Line Above a Letter in Microsoft Word
- How to Insert a Line Above a Table in Word
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel Page Break on Row: How to Set and Fix ItTo put a page break above a specific row in Excel for Microsoft 365 on Windows, select that…
- How to Fix an Array in Excel and Repair Formula ErrorsTo fix an array in Excel, identify whether it is a modern spilled formula or a legacy Ctrl+Shift+Enter…
- Excel Filter Shortcut Keys Not Working? Fixes to TryIn Excel for Microsoft 365 on Windows, press Ctrl+Shift+L to turn AutoFilter on or off. If nothing happens,…
- VLOOKUP Not Working Across Sheets? Fix the CausesYes—VLOOKUP works across worksheets in the same Excel workbook. Check that the formula points to the correct sheet…
- Excel UPPER Function Not Working? Fix Common CausesIf Excel’s UPPER function is not working, first check that the formula is entered as =UPPER(A2), with the…
- Excel Not Working Properly? Troubleshoot Common IssuesIf Excel is not working properly, first save a copy of your workbook, close and reopen Excel, and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.