How to Delete Every Excel Row Containing a Specific Keyword
Question details
The user needs to efficiently remove all rows in an Excel spreadsheet that contain a specific target value or keyword without deleting them one by one or writing VBA macros.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Cleaning up a large dataset by identifying and removing rows based on specific text criteria.
- Observed behavior
- The user is looking for a bulk deletion method to replace the tedious manual process of finding and deleting rows individually.
Before making bulk deletions, it is highly recommended to create a backup copy of your workbook to prevent accidental data loss.
Use AutoFilter and Go To Special to Delete Rows
Filter your dataset to display only the rows containing the specific keyword, isolate the visible cells, and delete them simultaneously.
This method leverages Excel's built-in AutoFilter and the 'Go To Special' command. By explicitly selecting only the visible cells after filtering, you ensure that hidden rows containing vital data remain completely untouched during the deletion process.
Select your data range, navigate to the Data tab on the ribbon, and click the Filter button to enable drop-down arrows on your column headers.
Click the filter drop-down on the column containing your target keyword (for example, Column Z). Uncheck 'Select All', check only your target value (e.g., 'True'), and click OK.
Highlight the visible data rows that remain on the screen, making sure carefully to exclude the top header row from your selection.
Go to the Home tab, click Find & Select, and choose Go To Special. In the dialog box, select 'Visible cells only' and click OK.
Right-click anywhere within the highlighted selection, choose Delete Row, and if prompted, select 'Entire row'.
Return to the Data tab and click Clear (or click the filter drop-down and choose 'Select All') to remove the filter and display the remaining cleaned data.

Easily Delete Rows by Keyword Using WPS Spreadsheet
WPS Spreadsheet offers a highly intuitive filtering system that allows you to quickly isolate and delete rows based on specific keywords. It provides a smooth experience for managing large datasets while ensuring complete formatting preservation.
- 1. Open and Filter: Open your document in WPS Spreadsheet, highlight the header row, go to the Data tab, and click AutoFilter.
- 2. Search for the Keyword: Click the filter arrow on the relevant column, input your specific keyword in the search box, and click OK to display only the matching rows.
- 3. Delete Selected Rows: Select all the filtered rows (excluding the header), right-click the selection, and click Delete > Entire Row.
- 4. Restore View: Click the filter arrow again and select 'Clear Filter' to view your newly updated dataset.

Frequently Asked Questions
Can I delete rows based on multiple keywords at once?
Yes. Using the Text Filters feature in the AutoFilter drop-down, you can choose 'Custom Filter' or 'Contains', and use the 'OR' condition to filter and display rows containing either of your specified keywords for bulk deletion.
Will deleting visible cells affect my hidden rows?
No. By using the 'Go To Special' > 'Visible cells only' command, you guarantee that only the currently displayed rows matching your keyword are selected and deleted, leaving any hidden or un-filtered rows perfectly intact.
Is there a way to delete these rows using a formula?
Formulas alone cannot directly delete rows. However, you can use a formula (like IF or SEARCH) in a new helper column to flag rows with the keyword (e.g., returning 'Delete' or 'Keep'). You can then filter that helper column by 'Delete' and remove those rows.




