How to Delete Rows if Cell Contains Specific Text in Excel

Written by

Editorial Team

Reviewed by

Laura Tsitlidze

Last updated on August 3, 2023

This tutorial demonstrates how to delete rows if a cell contains specific text in Excel.

delete rows intro

Delete Rows With Specific Text

Say you have data set with names in Columns A, B, and C and want to select all cells with the name John, then delete all rows containing those cells.

delete rows specific text 1 new

 

  1. First, select the data set (A2:C6). Then in the Ribbon, go to Home > Find & Select > Find.

delete rows specific text 2

 

  1. 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.

delete rows specific text 3

 

  1. The results are listed at the bottom of the Find and Replace window. Select all of them and click Close.

delete rows specific text 4

 

As a result, all cells with the specific value (John) are selected.

delete rows specific text 5 new

 

  1. To delete rows that contain these cells, right-click anywhere in the data range and from the drop-down menu, choose Delete.

delete rows specific text 5 new

 

  1. In the Delete dialog window, choose the Entire row and click OK.

delete rows specific text 7

 

As a result, all the rows with cells that contain specific text (here, John) are deleted.

delete rows specific text 8 new

Delete Rows with Certain Text – Easiest Way

The easiest way to delete rows with certain text is with our add-in AutoMacro for Excel.

delete rows certain values

With AutoMacro for Excel, you can automate tedious Excel tasks with just a few simple clicks.

You can even add buttons to run automations.

delete rows certain text
Learn More!

Note: You can also use VBA code to delete entire rows.

AI Formula Generator

Try for Free

See all How-To Articles