Jan 21 2021 01:36 PM
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 spreadsheet, but don't know how to write a macro that will delete only rows that contain that specific word. I'm sure its simple, but my programming knowledge is minimal. Any help would be greatly appreciated!
Jan 21 2021 01:50 PM
SolutionYou can do this without programming:
Jan 21 2021 05:48 PM
@Hans Vogelaar Thank you... that was simple!
Sep 28 2021 01:24 PM
@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 ]
Sep 28 2021 01:56 PM
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.
Sep 28 2021 03:19 PM
Jun 23 2023 06:10 AM
Just wanted to add to this for others that come here looking for a good solution...
If you have an enormous number of rows after using the Auto Filter to view the filtered data, selecting all will delete hidden rows as well.
To delete just the rows selected by the filter use the Find&Select - GoTo Special option and choose "Visible cells only", then delete rows will only delete the rows selected by the filter.
Jan 21 2021 01:50 PM
SolutionYou can do this without programming: