How to Filter and Delete Rows by Specific Text in Excel
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.

- 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 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.
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.
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.
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.
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.
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 a Helper Column with Formulas for Multiple Text Prefixes
Ideal for complex scenarios where you need to keep rows starting with several different text values simultaneously.
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. Open Your File: Launch WPS Spreadsheet and open your dataset containing the client records.
- 2. Apply AutoFilter: Highlight your data, navigate to the 'Data' tab, and click the 'AutoFilter' icon.
- 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. Delete and Clear: Select the visible rows, right-click to select 'Delete', then clear the filter to reveal your perfectly cleaned data.

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.




