This tutorial demonstrates how to delete rows if a cell contains specific text in Excel.
Delete Rows With Specific Text
- First, select the data set (A2:C6). Then in the Ribbon, go to Home > Find & Select > Find.
- The Find and Replace dialog window opens. In Find what box, type the value you are searching for (here, John), then click Find All.
You can also find and replace with VBA.
- The results are listed at the bottom of the Find and Replace window. Select all of them and click Close.
As a result, all cells with the specific value (John) are selected.
- To delete rows that contain these cells, right-click anywhere in the data range and from the drop-down menu, choose Delete.
- In the Delete dialog window, choose the Entire row and click OK.
As a result, all the rows with cells that contain specific text (here, John) are deleted.
Note: You can also use VBA code to delete entire rows.