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. Lookups
  3. Fuzzy Match in Excel: Find Names That Nearly Match

Fuzzy Match in Excel: Find Names That Nearly Match

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

The short answer

Excel has no fuzzy match function, so you combine three tools. Clean both lists with TRIM and SUBSTITUTE, then look up partial names with a wildcard: =XLOOKUP(""&E2&"",A2:A6,B2:B6,"Not found",2). For real typos, like Contosso for Contoso, use Power Query's Merge with "Use fuzzy matching". Always review fuzzy results before you trust them.

Key takeaways

  • Most "near matches" are really spaces, punctuation or extra words. Clean them and an exact match works.
  • XLOOKUP with match mode 2 and ""&E2&"" finds a name that contains your text.
  • Use XLOOKUP(TRUE,ISNUMBER(SEARCH(...))) when the short name is in the table and the long name is in your cell.
  • Formulas can't fix spelling mistakes. Power Query's fuzzy merge can, with a similarity threshold.
  • Check how many rows a wildcard matches with COUNTIF, because XLOOKUP returns only the first.
On this page+
  1. What "fuzzy matching" means
  2. Step 1: clean the text first
  3. Step 2: find partial matches with XLOOKUP wildcards
  4. Step 3: when the long name is in your cell
  5. Step 4: fix typos with Power Query fuzzy merge
  6. Which method should you use?
  7. Practise it

A fuzzy match in Excel finds names that are close but not identical, like "Fabrikam, Inc" and "Fabrikam Inc.". Excel has no single fuzzy-match function, but most near matches are really extra spaces, punctuation or extra words, and TRIM, SUBSTITUTE and wildcard lookups handle those. For true spelling mistakes, Power Query has a fuzzy merge. This guide shows each method, from simplest to strongest, so you can match customer, supplier or employee lists that don't line up.

What "fuzzy matching" means#

Fuzzy matching means finding the best match even when two text values aren't exactly the same. A normal lookup like XLOOKUP or VLOOKUP with an exact match fails on any difference at all and returns #N/A. Here are the usual differences and what fixes them:

DifferenceExampleFix
Extra spaces" northwind " vs Northwind TradersTRIM plus a wildcard
Capital lettersADVENTURE WORKSNothing: lookups ignore case
PunctuationFabrikam, Inc vs Fabrikam Inc.SUBSTITUTE
Extra wordsTailspin vs Tailspin ToysWildcard lookup
Spelling mistakeContosso vs Contoso Ltd.Power Query fuzzy merge

All the examples use this supplier list in A1:B6:

AB
1SupplierAccount manager
2Contoso Ltd.Priya
3Fabrikam Inc.Tom
4Northwind TradersLena
5Adventure Works CyclesOmar
6Tailspin ToysMei

Step 1: clean the text first#

Cleaning removes the differences that don't matter, so more names match exactly. TRIM deletes spaces at the start and end and squeezes double spaces to one. SUBSTITUTE removes characters you don't care about, like commas and full stops:

Excel formula
=TRIM(SUBSTITUTE(SUBSTITUTE(E2,",",""),".",""))

This turns Fabrikam, Inc. into Fabrikam Inc. Clean both lists the same way, in helper columns, and many "fuzzy" problems simply disappear. If TRIM seems to do nothing, the data may contain non-breaking spaces from a web page; the guide on why TRIM isn't working shows the fix. You can practise cleaning text in a live sheet, and the TRIM function guide has the syntax.

Step 2: find partial matches with XLOOKUP wildcards#

When the typed name is part of the full name, wrap it in wildcards. In Excel, * means "any number of characters", so "*northwind*" matches anything that contains northwind. XLOOKUP uses wildcards only when you set its fifth argument, the match mode, to 2:

Excel formula
=XLOOKUP("*"&TRIM(E2)&"*",A2:A6,B2:B6,"Not found",2)

If E2 holds " northwind ", TRIM gives northwind, the pattern becomes *northwind*, and the result is Lena. Case doesn't matter, so ADVENTURE WORKS returns Omar. XLOOKUP needs Excel 2021 or Microsoft 365. See the XLOOKUP function guide and the article on XLOOKUP wildcard matches for more patterns.

In older Excel, VLOOKUP accepts wildcards whenever the last argument is FALSE:

Excel formula
=VLOOKUP("*"&TRIM(E2)&"*",A2:B6,2,FALSE)

The guide to VLOOKUP with wildcards covers that version. To search for a real * or ? character, put a tilde in front of it: ~*.

Check for more than one match#

A wildcard can match several rows, and XLOOKUP silently returns the first. Before you trust a result, count the candidates:

Excel formula
=COUNTIF(A2:A6,"*"&TRIM(E2)&"*")

A result of 1 is safe. A result above 1 means the search text is too short; "*Works*" might match both "Adventure Works Cycles" and another supplier with "Works" in its name. The wildcards in criteria lesson practises these patterns.

Step 3: when the long name is in your cell#

Sometimes it's the other way round: the table holds short names like Fabrikam, and your cell holds a long one like FABRIKAM INC. (UK). A wildcard around the cell won't help, because the long text isn't inside the short one. Instead, ask SEARCH whether each table name appears inside your cell:

Excel formula
=XLOOKUP(TRUE,ISNUMBER(SEARCH(A2:A6,E2)),B2:B6,"Not found")

SEARCH returns a position number where it finds a table name inside E2, and an error where it doesn't. ISNUMBER turns that into TRUE or FALSE, and XLOOKUP returns the row of the first TRUE. With Fabrikam in the table, the result is Tom. SEARCH ignores case; the SEARCH function guide explains the details.

Step 4: fix typos with Power Query fuzzy merge#

Formulas can't tell that "Contosso" is a misspelling of "Contoso". Power Query, the data tool built into Excel, can. Its Merge Queries command has a fuzzy matching option in Excel for Microsoft 365 on Windows; the Mac and web versions have fewer Power Query features.

  1. Turn each list into a table (Ctrl+T), then load each one with Data > From Table/Range.
  2. In the Power Query editor, choose Home > Merge Queries.
  3. Pick the second table and click the name column in both.
  4. Tick Use fuzzy matching to perform the merge.
  5. Open Fuzzy matching options and set the Similarity threshold, a number from 0 to 1. Higher is stricter.
  6. Click OK, expand the new column, and choose Close & Load.

Fuzzy matching makes guesses, so some will be wrong. Start strict, lower the threshold slowly, and review every match before you use it. Microsoft has also published a Fuzzy Lookup add-in for Windows desktop Excel that works in a similar way.

Which method should you use?#

Start simple and only move on when the simpler method leaves gaps:

Your problemBest methodWorks in
Spaces, case, punctuationTRIM and SUBSTITUTE, then exact matchEvery version
Typed name is part of the full nameXLOOKUP or VLOOKUP with wildcardsXLOOKUP: 2021 and 365; VLOOKUP: all
Full name contains the table nameXLOOKUP + ISNUMBER + SEARCHExcel 2021 and 365
Spelling mistakesPower Query fuzzy mergeMicrosoft 365 (Windows)

If you're matching numbers rather than text, you want the nearest value instead; see how to find the closest match in Excel. And if a lookup still shows #N/A, the guide to fixing the #N/A error walks through every cause.

Practise it#

Wildcard lookups are a favourite in data-cleaning tests. Practise XLOOKUP wildcards and match modes in a live spreadsheet: you search partial names and set the match mode yourself, and each formula is checked instantly. Then try wildcards in criteria and the cleaning text lesson, and do the exercise on this page.

Try it yourself

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

Someone typed a supplier name with extra spaces in E2. In F2, use XLOOKUP to find the account manager: search for *""&TRIM(E2)&""* in A2:A6, return B2:B6, use "Not found" if there's no match, and set match mode 2 (wildcards).

fx
ABCDEFG
1
Supplier
Account manager
Name typed
Manager
2
Contoso Ltd.
Priya
northwind
3
Fabrikam Inc.
Tom
4
Northwind Traders
Lena
5
Adventure Works Cycles
Omar
6
Tailspin Toys
Mei
7
8
9

Tip: Build the pattern first: "*"&TRIM(E2)&"*". Match mode 2 is the fifth argument.

Practise this in a lesson

LessonXLOOKUP wildcards and match modesSearch partial names with XLOOKUP's wildcard mode, and place values into tiers with next-smaller and next-larger matches.LessonWildcards and cell-based criteriaMatch partial text with * and ?, and build criteria from cells like ">"&H5 so your formulas adapt.LessonCleaning messy textFix stray spaces, random capitals and inconsistent separators in imported data with TRIM, PROPER, UPPER, LOWER and SUBSTITUTE.Function guideXLOOKUPXLOOKUP explained with real examples: exact matches, looking left and custom not-found messages, plus a live exercise to try now.Function guideSEARCHLocate text regardless of capitals with Excel's SEARCH, use wildcards, and build "contains" checks with ISNUMBER. Examples and live practice.Function guideTRIMClean imported data with Excel's TRIM: strip leading, trailing and double spaces so lookups and counts work. Examples and live practice.

Frequently asked questions

Does Excel have a fuzzy lookup function?

+

No worksheet function does fuzzy matching. You can get close with TRIM, SUBSTITUTE and wildcard lookups, and Power Query's Merge Queries has a Use fuzzy matching option for spelling differences.

How do I match partial text in Excel?

+

Put wildcards around the text and use an exact-match lookup: =XLOOKUP(""&E2&"",A2:A6,B2:B6,"Not found",2), or =VLOOKUP(""&E2&"",A2:B6,2,FALSE) in older Excel.

How do I compare two lists of names that are not exactly the same?

+

Clean both lists first with TRIM, LOWER and SUBSTITUTE to remove spaces, case and punctuation. Then use XLOOKUP or COUNTIF. Whatever still fails to match usually needs a fuzzy merge in Power Query or a manual check.

What is the similarity threshold in Power Query fuzzy matching?

+

It is a number from 0 to 1 that sets how alike two values must be to match. Higher values are stricter. Start with the default and lower it slowly while checking the results.

Why does my wildcard lookup return the wrong row?

+

A wildcard can match several rows, and XLOOKUP returns the first one it finds. Use COUNTIF with the same pattern to see how many rows match, and make the search text more specific.

Sources

  • XLOOKUP function - Microsoft Support
  • SEARCH, SEARCHB functions - Microsoft Support
  • TRIM function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 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. What "fuzzy matching" means
  2. Step 1: clean the text first
  3. Step 2: find partial matches with XLOOKUP wildcards
  4. Step 3: when the long name is in your cell
  5. Step 4: fix typos with Power Query fuzzy merge
  6. Which method should you use?
  7. Practise it

Keep reading

Lookups· 6 min read

XLOOKUP Wildcards and Match Modes Explained

XLOOKUP uses wildcards only when its 5th argument, match_mode, is 2: =XLOOKUP("Riverside*",A2:A9,B2:B9,"Not found",2). The * stands for any number of characters and ? for exactly one. Match mode -1 returns an exact match or the next smaller value, and 1 the next larger, which is useful for bands and tiers.

Lookups· 5 min read

VLOOKUP With Wildcards: Partial Match Lookups

To use a wildcard in VLOOKUP, join an asterisk to the lookup value and keep FALSE for exact match: =VLOOKUP("*"&F2&"*",A2:C6,2,FALSE) finds the first row whose first column contains the text in F2. The asterisk means any characters, a question mark means exactly one, and a tilde lets you search for a real * or ?.

Lookups· 6 min read

Find the Closest Match in Excel

To find the closest match in Excel, measure how far each value is from your target with ABS, then look up the smallest gap: =XLOOKUP(MIN(ABS(B2:B8-E1)),ABS(B2:B8-E1),A2:A8). This works on unsorted data in Excel 2021 or Microsoft 365. If you only want the next smaller or next larger value, use XLOOKUP's match_mode -1 or 1 instead.

More on lookups

  • HLOOKUP in Excel (and When to Use It)
  • INDEX Function in Excel: Return a Value by Position
  • INDEX MATCH in Excel: The Beginner's Guide
  • INDEX MATCH MATCH: Two-Way Lookups Explained
  • INDIRECT Function in Excel: Build References From Text
  • How to Look Up a Value by Date in Excel
All lookups 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