logo
search
Others

How to Filter and Delete Rows by Specific Text in Excel

Jason MillerJason Miller Oct 13, 2026 870 views

Question details

The user needs to manage a large Excel worksheet by keeping only the rows that start with specific text and deleting all other unwanted records.

How to Filter and Delete Rows Based on Specific Text in Excel
Product
Excel
Device & OS
not provided
Scenario
Managing thousands of client records and extracting relevant data by removing unrelated rows.
Observed behavior
The goal is to successfully isolate rows beginning with specific text strings and permanently delete the rest without affecting the remaining dataset.
Before you start

Before applying filters, inspect your dataset to ensure there are no completely blank rows or columns, as these can break the continuous data range and cause the filter to miss sections of your spreadsheet.

Solution 1Recommended

Use Built-in Text Filters to Isolate and Delete Unwanted Rows

This method uses Excel's standard filtering tool to hide the rows you want to keep and display only the rows designated for deletion.

When dealing with large datasets, the safest way to delete unwanted data is to filter for the exact opposite of what you want to keep. By filtering for values that 'Do Not Begin With' your target text, you can safely select and delete the visible rows.

1
Select the Data Range

Click on any cell within your dataset, navigate to the 'Data' tab on the top ribbon, and click the 'Filter' button to apply drop-down arrows to your headers.

2
Filter for Unwanted Rows

Click the filter arrow on your target column. Go to 'Text Filters' and select 'Does Not Begin With...'. Enter the text prefix of the records you want to keep, then click OK. This will display only the rows you want to delete.

3
Delete the Filtered Rows

Highlight all the visible rows containing the unwanted data. Right-click on the row numbers on the left side of the screen and choose 'Delete Row'. Click OK if prompted.

4
Clear the Filter

Go back to the 'Data' tab and click 'Clear' in the Sort & Filter group. Your worksheet will now display only the rows that begin with your specific text.

Use Built-in Text Filters to Isolate and Delete Unwanted Rows
Selecting Visible Cells: In older versions of Excel, highlight the rows and press Alt+; (semicolon) before right-clicking to delete. This guarantees that only the visible rows are deleted and hidden rows remain safe.
Data Management with WPS Spreadsheet

Filter and Clean Large Datasets Effortlessly in WPS Spreadsheet

WPS Spreadsheet provides powerful filtering, sorting, and data handling tools to quickly clean up thousands of client records. Fully compatible with Microsoft Excel file formats, it allows you to streamline your workflow smoothly and for free.

  1. 1. Open Your File: Launch WPS Spreadsheet and open your dataset containing the client records.
  2. 2. Apply AutoFilter: Highlight your data, navigate to the 'Data' tab, and click the 'AutoFilter' icon.
  3. 3. Set Text Filters: Click the drop-down on your target column, navigate to 'Text Filter', and select 'Does Not Begin With' to isolate unwanted records.
  4. 4. Delete and Clear: Select the visible rows, right-click to select 'Delete', then clear the filter to reveal your perfectly cleaned data.
Easily apply custom Text Filters like 'Begins With' or 'Contains' to large datasets.Handle thousands of rows of data without lag or crashing.Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv).Free, lightweight, and features a familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

How do I filter rows that contain specific text anywhere in the cell?

In the filter drop-down menu, go to 'Text Filters' and select 'Contains' instead of 'Begins With'. Enter your keyword, and the spreadsheet will display any row containing that text string, regardless of its position in the cell.

Why are some rows not deleting when I apply the filter?

This usually happens if your initial selection doesn't cover the entire dataset or if there are entirely blank rows breaking the data range. Ensure you highlight all data columns manually before clicking the Filter button to avoid leaving out sections of your table.

Can I copy the filtered data instead of deleting the rest?

Yes. If you prefer not to delete data, apply the filter for 'Begins With' to show only the rows you want to keep. Highlight these visible rows, press Ctrl+C to copy them, create a new worksheet, and press Ctrl+V to paste the clean dataset.