How to Index And Match All Partial Matches in Excel

Learn multiple Excel methods to index and match all partial matches with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
14 min read • Last updated: 7/2/2025

How to Index And Match All Partial Matches in Excel

Why This Task Matters in Excel

Every spreadsheet user eventually faces the “needle-in-a-haystack” problem: you know part of the value you want, but not the entire value. Maybe you remember that the customer’s company name contains “Global,” or that a product code ends with “-XL.” When your worksheet holds hundreds of rows of customer names, product codes, or transaction IDs, locating every record that contains the partial string can be painfully slow if you sort and scroll manually.

Indexing and matching all partial matches is the systematic, formula-driven solution. Rather than returning the first found item, it extracts every row that meets the partial criterion, so nothing slips through the cracks. This ability underpins a wide range of business tasks:

  • Customer service teams need to pull every ticket that mentions a keyword, such as “refund” or “late delivery.”
  • Procurement analysts may have to surface every invoice where the supplier name contains “Steel,” regardless of preceding or trailing words.
  • Marketing departments often filter mailing lists for contacts whose industry includes “health,” ensuring compliance with campaign segmentation rules.

Excel is ideally suited for these lookups because it combines rich text functions (SEARCH, FIND, LEFT, RIGHT), powerful lookup engines (INDEX + MATCH, FILTER, XLOOKUP), and, in modern versions, dynamic spill ranges that can output a flexible list in a single cell. If you do not master partial-match extraction, you risk overlooking critical records, spending unnecessary hours on manual filtering, or producing incomplete reports that undermine decision-making.

Moreover, knowing how to capture all partial matches reinforces other core Excel skills: logical tests, array thinking, spill ranges, and proper data structuring. The same logic you apply here appears in dashboards, automated reporting, and even VBA scripts that loop through datasets. Once you can confidently return multiple partial matches, you will be more comfortable designing complex formulas, debugging lookup errors, and optimizing sheets for both speed and accuracy.

Best Excel Approach

In modern Microsoft 365 or Excel 2021, the FILTER function combined with SEARCH is the most direct and maintenance-friendly way to return all partial matches. It requires no helper columns, automatically resizes as data changes, and retains clarity for future editors.

=FILTER(DataTable, ISNUMBER(SEARCH(SearchTerm, LookupColumn)))
  • DataTable – the range or structured table you want returned (entire rows or selected columns).
  • SearchTerm – the cell that contains the text fragment you are searching for (e.g., $G$2).
  • LookupColumn – the single column (same height as DataTable) tested against the search term.

Why is this approach best?

  1. SEARCH performs a case-insensitive locate of the fragment anywhere in each cell.
  2. ISNUMBER converts SEARCH’s position output into a TRUE/FALSE array, the exact shape FILTER expects as its include argument.
  3. FILTER vertically spills every row where the include array is TRUE, so you capture all matches instantly.

When to choose alternatives:

  • If you or your colleagues run older versions (Excel 2016 or earlier) that lack FILTER, you will need an INDEX-based array formula paired with SMALL or AGGREGATE.
  • If you specifically need to pull only one field (rather than whole rows), a leaner INDEX formula can be faster.
  • When performance is paramount on tens of thousands of rows, an advanced Power Query solution or structured Table filters may outperform formulas.

Alternative (legacy) array formulation for a single-column extract:

=IFERROR(
 INDEX(ReturnRange,
  SMALL(IF(ISNUMBER(SEARCH(SearchTerm, LookupColumn)),
   ROW(LookupColumn)-MIN(ROW(LookupColumn))+1),
  ROWS($J$3:J3))),
 "")

Entered with Ctrl + Shift + Enter in Excel 2019 and earlier; in Microsoft 365 it spills automatically.

Parameters and Inputs

Before building any of the formulas, confirm that your inputs are consistent:

  • SearchTerm (text) – usually a single cell where the user types a fragment such as “global” or “-XL.” The formula treats it literally; no wildcard symbols are required when using SEARCH.
  • LookupColumn (range) – the column tested for partial inclusion. It must be a single contiguous column, equal in row count to DataTable or ReturnRange.
  • DataTable or ReturnRange (range or structured reference) – the range you want returned. With FILTER you can provide entire rows [A2:F500] or a subset [A2:C500].
  • Optional \"if_empty\" in FILTER – specify a message like \"No matches\" to prevent #CALC! errors.
  • Row index adjustments – if you build the legacy INDEX solution, subtract MIN(ROW(LookupColumn))+1 to normalize row numbers, ensuring SMALL outputs 1 for the first data row.

Validation rules:

  • Ensure LookupColumn has no merged cells; merged structures break array alignment.
  • SearchTerm should be wrapped with TRIM to remove unwanted spaces if users type values manually.
  • When using SEARCH, empty cells in LookupColumn return #VALUE!, so wrap ISNUMBER around SEARCH or use IFERROR(SEARCH(...),0) to neutralize blanks.
  • Treat numeric codes stored as numbers by converting them to text with TEXT(LookupColumn,\"@\") or by setting the column to text format to avoid SEARCH errors.

Edge cases:

  • Blank SearchTerm should either return all records (use LEN(SearchTerm)=0 as a bypass) or display a prompt “Enter keyword.”
  • Duplicates are deliberate: if the same record appears twice and matches, both instances will be returned, which is usually desirable in transaction logs.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine a small inventory list where you need every product whose description contains the word “filter.”

Sample data layout:

  • [A1:D1] headers: ProdID, Description, Category, Price
  • Rows [A2:D11] contain ten assorted products: “Oil Filter 500ml,” “Air Filter HighFlow,” “Fuel Pump,” etc.
  • Cell G2 is the keyword entry cell labelled “Search term.”
  • Cell B15 will host the results heading “Matched Products.”

Step-by-step:

  1. Click cell B16 (the desired spill start).
  2. Enter the modern formula:
=FILTER(A2:D11, ISNUMBER(SEARCH($G$2, B2:B11)), "No matches")
  1. Press Enter. Excel returns every row where Description (column B) includes whatever you typed in G2.
  2. Type “filter” in G2. Immediately rows for “Oil Filter 500ml” and “Air Filter HighFlow” appear below.
  3. Change G2 to “pump” and watch the spill range update instantly, now pulling “Fuel Pump.”
  4. Clear G2 entirely; the include array becomes a column of #VALUE!. Because of the optional argument \"No matches,\" the formula displays that message instead of an error.

Why this works:

  • SEARCH returns the position of “filter” within each description or #VALUE! when not found.
  • ISNUMBER converts positions to TRUE.
  • FILTER selects entire rows [A2:D11] wherever TRUE, keeping your dataset perfectly aligned.

Troubleshooting:

  • If you see #CALC!, verify that G2 is not blank or wrap the include argument in IF(LEN($G$2)=0, TRUE, ISNUMBER(SEARCH(...))).
  • If unexpected results appear, ensure your Description column is of the same length as DataTable; differing sizes cause a #VALUE! error.

Common variations:

  • Return only ProdID and Price: set DataTable to [A2:A11]&[D2:D11] or use a horizontal stack inside CHOOSE.
  • Case-sensitive match: swap SEARCH with FIND (note that FIND fails on different cases).

Example 2: Real-World Application

Scenario: A customer support manager stores ticket data in a Table named Tickets with columns TicketID, Subject, Priority, TagList, and Owner. She wants a quick dashboard that lists every high-priority ticket whose Subject or TagList contains the fragment typed by the user.

Data assumptions:

  • Tickets spans [A2:E5000].
  • Cell H2 (named nSearch) contains the keyword.
  • The filter must also respect Priority = \"High\".
  • The output should display TicketID, Subject, and Owner only.

Implementation:

  1. Insert a helper Boolean column in the Table (or calculate on the fly) using a nested OR. A direct formula approach (no helper column) is cleaner:
=FILTER(
  CHOOSE({1,2,3}, Tickets[TicketID], Tickets[Subject], Tickets[Owner]),
  (Tickets[Priority]="High") *
  ( ISNUMBER(SEARCH(nSearch, Tickets[Subject])) +
    ISNUMBER(SEARCH(nSearch, Tickets[TagList])) ),
  "No matching high-priority tickets")

Explanation:

  • CHOOSE creates a three-column array from non-contiguous columns (TicketID, Subject, Owner).
  • The include argument multiplies a TRUE/FALSE column for priority by the sum of two TRUE/FALSE vectors (Subject contains keyword, TagList contains keyword). Any non-zero result equals TRUE.
  • The entire result spills beneath your dashboard heading, updating as staff close tickets or re-assign owners.

Business impact: The manager can deploy this dashboard on a large monitor and instantly see tickets that mention “refund,” “critical,” or any other pressing keyword without navigating filters. The formula scales to 5 000 rows without noticeable lag in Microsoft 365; testing up to 50 000 rows shows sub-second recalc on typical laptops.

Integration:

  • Combine with conditional formatting to color urgent tickets in red.
  • Add a COUNT function referencing the spill range to show “Total high-priority matches: [n]” at the top of the dashboard.
  • Connect to Power Automate; when COUNT exceeds zero, trigger an email alert.

Performance considerations:

  • SEARCH is volatile when its arguments change, but limited to two columns it remains efficient.
  • Keep Tickets as an Excel Table so formulas automatically expand with new tickets.

Example 3: Advanced Technique

Legacy environment — Excel 2010, 32-bit, where FILTER does not exist. You must deliver a workbook that lists all rows with partial matches, without VBA (macros disabled by policy).

Data: Purchase orders in [A2:H2000], with Supplier stored in column C.
Goal: Output PO Number, Supplier, Amount for every row whose Supplier contains the keyword in K2, sorted in ascending Amount.

Step-by-step:

  1. Select cell M3. Enter the following array formula (confirm with Ctrl + Shift + Enter):
=IFERROR(
 INDEX($A$2:$H$2000,
  SMALL(IF(ISNUMBER(SEARCH($K$2, $C$2:$C$2000)),
   ROW($C$2:$C$2000)-ROW($C$2)+1),
  ROWS($M$3:M3)),
 {1,3,8}),
 "")
  1. Copy the formula rightward to O3 (spilling is unavailable, so we manually fill three columns).
  2. Drag the three-column block downward until blanks appear.

How it works:

  • SEARCH identifies matches in Supplier.
  • IF returns row offsets for matches, or FALSE when not found.
  • SMALL fetches the nth smallest offset, governed by ROWS($M$3:M3), which increments as you copy downward, effectively asking for the 1st, 2nd, 3rd … match.
  • INDEX returns the entire row, but we only want PO Number (column 1), Supplier (3), and Amount (8) so we feed a column array [1,3,8]. Inside an array formula, curly braces are acceptable.
  • IFERROR keeps the sheet tidy once all matches are exhausted.

Adding the sort by Amount:
Within each formula instance you could nest the entire INDEX inside a second INDEX(SORT BY)… but Excel 2010 lacks SORT. Instead, pre-sort your source data by Amount or apply AGGREGATE to choose rows in ascending Amount. For brevity:

=IFERROR(
 INDEX($A$2:$H$2000,
  AGGREGATE(15,6,ROW($C$2:$C$2000)-ROW($C$2)+1/
   (ISNUMBER(SEARCH($K$2,$C$2:$C$2000))), ROWS($M$3:M3)),
 {1,3,8}),
 "")

AGGREGATE function 15 (SMALL) with option 6 ignores errors and returns the nth smallest row number where the logical test is TRUE, simultaneously sorting by Amount because the original range was sorted.

Professional tips:

  • Name ranges for readability.
  • Hide helper rows that store numeric offsets if you choose to pre-calculate them.
  • Because this is a heavy array formula on 2000 rows, limit volatile functions like NOW and INDIRECT in the workbook to avoid sluggish recalculation.

Tips and Best Practices

  1. Convert datasets to structured Tables so formulas expand automatically as rows are added; structured references are easier to read than fixed addresses.
  2. When using SEARCH, wrap both the lookup fragment and the target column in UPPER() or LOWER() if you desire case-insensitive behavior and plan to migrate the workbook to Google Sheets, where SEARCH’s case behavior differs.
  3. For dynamic dashboards, spill formulas into dedicated, hidden worksheet sections and reference them with cell-linking on the front-end sheet. This reduces accidental overwriting by end users.
  4. Document your formulas with cell comments or Note boxes summarizing how the array logic works. Future collaborators (or your future self) will thank you.
  5. If performance degrades on very large datasets, replace SEARCH with FIND if you can enforce exact case, or switch to Power Query which can filter on Text.Contains faster and avoids volatile recalculation.
  6. Regularly test edge cases: blank search term, leading/trailing spaces, and unexpected non-text entries in the lookup column. Building a small “quality check” section with ISERROR or COUNT errors can prevent surprises.

Common Mistakes to Avoid

  1. Mixing relative and absolute references: forgetting to lock SearchTerm ($G$2) or the first row of LookupColumn can shift the reference as you copy formulas, leading to inconsistent results. Use F4 to fix addresses.
  2. Using wildcards incorrectly: with SEARCH you do not need * or ? wildcards. Adding them can lead to confusing “no result” scenarios. Reserve wildcards for COUNTIF or XLOOKUP when specifically required.
  3. Triggering implicit intersection errors: in pre-365 Excel, writing array formulas without Ctrl + Shift + Enter causes only the first element to return, fooling users into thinking data is missing.
  4. Over-formatting result ranges: manually adding total rows or headings inside spill ranges causes the #SPILL! error in Microsoft 365. Place additional content above or beside, never within the expected spill area.
  5. Ignoring data type mismatches: numeric codes stored as numbers versus text prevent SEARCH from working. Apply TEXT() or TEXTJOIN to coerce consistency, or run VALUE() for the opposite conversion.

Alternative Methods

MethodExcel VersionProsConsBest Use Case
FILTER + SEARCHMicrosoft 365 / 2021Single formula, auto-spill, readableNot available in older versionsDashboards, everyday analysis, sharing among 365 users
XLOOKUP with wildcard * & TEXTJOIN365/2021Flexible, can return multiple with TEXTJOINReturns concatenated string rather than separate rowsNeed single-cell output or quick list without spill
Power Query2010+ with add-inHandles massive data, GUI-driven, refreshableOutput is static until refresh, learning curveETL pipelines, scheduled reports, organizations with legacy Excel
INDEX-SMALL-IF array1997–365Works in any version, row-level controlComplex, harder to maintain, slows on very large dataCross-version compatibility, macro-disabled environments
Advanced Filter (built-in menu)All versionsNo formulas, quick ad-hoc filterManual each time unless automated with VBAOne-off searches by non-technical users

Choosing method:

  • Prefer FILTER + SEARCH where available; falls back gracefully to \"No matches\" message.
  • Use Power Query for millions of rows or when you need to merge multiple datasets.
  • Rely on INDEX-based arrays when sharing with clients still on Excel 2013.
  • XLOOKUP plus TEXTJOIN is perfect for email-ready summaries in a single cell.

Migration: When an organization upgrades to Microsoft 365, replace legacy arrays with FILTER gradually. Keep a copy of the old formulas in a hidden sheet for reference and validation during transition.

FAQ

When should I use this approach?

Use partial-match indexing whenever you need every occurrence of a text fragment, not just the first. Typical scenarios include auditing, compliance checks, keyword monitoring, and multi-category filtering where items can live in several groups simultaneously.

Can this work across multiple sheets?

Yes. Simply qualify the ranges: `=FILTER(`\'Jan Data\'!A2:D500, ISNUMBER(SEARCH($G$2,\'Jan Data\'!B2:B500))). For a consolidated list across months, combine ranges with VSTACK (Microsoft 365) before filtering, or append sheets in Power Query for older Excel.

What are the limitations?

  • FILTER supports only 1 048 576 rows, Excel’s sheet limit; for more data use Power Query or a database.
  • SEARCH is case-insensitive, so if you need case-sensitive logic substitute FIND or EXACT.
  • Legacy array formulas can slow recalculation on frequent workbook edits.

How do I handle errors?

Wrap SEARCH in IFERROR(SEARCH(...),0) if your LookupColumn contains blanks or potential #VALUE! sources. In FILTER, always provide the optional third argument to display a friendly message. For legacy arrays, nest formulas in IFERROR(...,\"\") to keep blank cells rather than errors.

Does this work in older Excel versions?

Yes, but you must rely on INDEX-SMALL-IF or Advanced Filter. FILTER, SORT, and dynamic arrays are unavailable in versions earlier than 2021. Always test Ctrl + Shift + Enter entry on those machines.

What about performance with large datasets?

On datasets below 100 000 rows, FILTER is almost instantaneous. Above that, consider turning off automatic calculation until your query is final. In any version, minimize volatile functions like INDIRECT and TODAY because they force recalculation of every array. For millions of records, push the data into Power Query or a SQL backend and pull summarized results into Excel.

Conclusion

Mastering the art of indexing and matching all partial matches elevates your Excel skillset from basic lookups to dynamic data mining. Whether you harness Microsoft 365’s elegant FILTER function or deploy robust legacy arrays, you gain the power to surface every relevant record with a single input. This agility accelerates decision-making, boosts auditing accuracy, and frees you from repetitive manual filtering. Continue exploring dynamic arrays, Power Query, and structured references to expand your analytical toolkit and keep your workbooks future-ready.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.