Data Import & Export

How to Find and Export Matching Rows to a New Excel Spreadsheet

Adam DavisAdam Davis Nov 10, 2026 868 views

Question details

The user needs to extract specific rows containing a target text value from a comma-separated field and export these matching records to a new worksheet.

How to Find and Export Matching Rows to a New Spreadsheet
Product
Excel
Device & OS
not provided
Scenario
Filtering and extracting data based on partial text matches within cells containing multiple comma-separated values.
Observed behavior
The user wants to return all corresponding rows dynamically to a separate spreadsheet without manual copying and pasting.
Before you start

Ensure your source data is organized with clear column headers. Formatting your data as an Excel Table will make your formulas dynamic and easier to manage.

Solution 1Recommended

Use the FILTER and SEARCH Functions

Combine the FILTER and SEARCH functions to dynamically extract rows that contain specific text, even within comma-separated lists.

The FILTER function is perfect for extracting matching records dynamically. By combining it with ISNUMBER and SEARCH, you can locate specific text strings anywhere within a cell, overcoming the challenge of comma-separated values.

1
Identify the data range

Determine the full range of your source data (e.g., Sheet1!A2:AA1000) and the specific column you want to search (e.g., Sheet1!AA2:AA1000).

2
Enter the FILTER formula

In your new worksheet, click the top-left cell where you want the exported data to begin. Enter the formula: =FILTER(Sheet1!A2:AA1000, ISNUMBER(SEARCH("Safety Team", Sheet1!AA2:AA1000)), "No matches").

3
Adjust the search term

Replace "Safety Team" with the exact text value you are looking for. The SEARCH function ensures it will find the text even if it is part of a comma-separated list.

4
Execute the formula

Press Enter to execute the formula. The matching rows will automatically spill into the adjacent cells, creating a dynamic export of your data.

Use the FILTER and SEARCH Functions
Dynamic Updates: Because this relies on a formula, any updates made to the original data range will automatically reflect in your newly filtered worksheet.
Advanced Data Handling with WPS Spreadsheet

Easily Filter and Export Data with WPS Office

WPS Spreadsheet fully supports advanced dynamic array functions like FILTER and SEARCH, allowing you to seamlessly manage, extract, and export complex data sets. It offers a familiar interface and robust data processing capabilities completely free of charge.

  1. 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your .xlsx workbook containing the source data.
  2. 2. Apply the FILTER formula: Navigate to a new sheet and use the =FILTER(range, ISNUMBER(SEARCH("text", search_column))) formula to extract your rows.
  3. 3. Export or save the file: Once the data is filtered, you can easily save the workbook or right-click the sheet tab to export the specific sheet as a new file.
Fully compatible with Microsoft Excel (.xlsx) formats and dynamic array formulas.Includes built-in advanced filtering and data extraction tools.Lightweight application that handles large datasets smoothly.Free to use with a highly intuitive, tabbed interface.
microsoft office alternative - wps office

Frequently Asked Questions

Can I search for exact matches instead of partial text in comma-separated fields?

Yes. If you only want exact cell matches and not partial text within a comma-separated list, you can simplify the formula by removing SEARCH and ISNUMBER. Use: =FILTER(Sheet1!A2:AA1000, Sheet1!AA2:AA1000="Safety Team", "No matches").

Why is my FILTER formula returning a #SPILL! error?

The #SPILL! error occurs when there isn't enough empty space for the filtered results to populate. Ensure the cells below and to the right of your formula are completely blank and free of any hidden data or merged cells.

Does this method work if the search text is case-sensitive?

The SEARCH function is not case-sensitive. If you need a strict case-sensitive search, replace the SEARCH function with the FIND function in your formula: =FILTER(Sheet1!A2:AA1000, ISNUMBER(FIND("Safety Team", Sheet1!AA2:AA1000))).

Can I filter data based on multiple criteria?

Yes, you can use the multiplication operator (*) for AND logic, or the addition operator (+) for OR logic within the FILTER function. For example, for two conditions, use: =FILTER(A2:C100, (B2:B100="Value1") * (C2:C100="Value2")).