How can I delete all rows that contain a specific word?
Great question from Lisa, who is extracting all information about upcoming events from a database. The database extract contains information about all events – even those that have been cancelled. We can make use of the Find tool to delete all rows recording cancelled events.
To delete all rows that contain the word cancelled (in any cell):
1. Use Excel’s Find tool to find all instances of the text string (step-by-step below):
- Hold CTRL while pressing the F key to display the Find box
- Type the word Cancelled in the Find What field
- Click the Options button to display all options and ensure Match entire Cell Contents is not selected (ticked)
- Click Find All
The Find box will display a list of all cells that contain the find value
2. Select all returned cells (step-by-step below):
- Hold CTRL while pressing the A key to select all results
- Click Close to close the Find box
3. Delete entire rows of selected cells (step-by-step below):
- Delete the selected cells using CTRL and – (minus)
- When prompted, select Entire Row
- Click OK
All Done! In just 6 clicks, all rows that contain a specific text string have been deleted, without having to manually find and delete each record.