Forum Discussion
RichardA2021
Jan 21, 2021Copper Contributor
Deleting rows that contain specific content
Copying records from a source into excel, each record copies over as either 2 or 3 lines. Nearly every record contains a unique line with the word "search" in it. I don't need those lines in my spr...
- Jan 21, 2021
You can do this without programming:
- On the Home tab of the ribbon, in the Sort & Filter group, turn on Filter.
- From the filter dropdown in the relevant column, select Text Filters > Contains...
- Enter Search in the box, then click OK.
- You should now see only the rows containing Search.
- Delete those rows.
- Turn off the filter.
HansVogelaar
Jan 21, 2021MVP
You can do this without programming:
- On the Home tab of the ribbon, in the Sort & Filter group, turn on Filter.
- From the filter dropdown in the relevant column, select Text Filters > Contains...
- Enter Search in the box, then click OK.
- You should now see only the rows containing Search.
- Delete those rows.
- Turn off the filter.
RichardA2021
Jan 22, 2021Copper Contributor
HansVogelaar Thank you... that was simple!
- RookBytesSep 28, 2021Copper Contributor
RichardA2021 @Hans Vogelaar Thank you both for this idea. I have a follow-on question too, if you don't mind, Hans:
What if the number of Rows I needed to get rid of were so many that it becomes impractical to delete them individually. Is there a way to say to Excel: "Delete all rows where the column WO_Type = CLOSED." And then for example, 1,500 rows are deleted instantaneously.
Thank you both for your time and consideration.
Best regards,
Rob Allsbrook [ @RookBytes ]
- HansVogelaarSep 28, 2021MVP
Using the AutoFilter method, you only need to select all rows except the top one after filtering and delete them in one go. Easy-peasy.
- RookBytesSep 28, 2021Copper ContributorAh, ok. I thought that would delete the hidden rows too. Thanks, Hans 🙂