Delete whole line with highlighted word

Closed
Report
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
Hello,

I have a large text and in this text some words are highlighted. I need a mcro to automatically delete each line that contains a highlighted word.

Thanks, by the thousands!

1 reply

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
in a sample workhsheet highlight some cells and then run this macro


Sub test()
Selection.EntireRow.Delete
Range("A1").Select
End Sub


before using this macro to your original file KEEP A COPY OF THE ORIGINAL FILE SAFELY SOMEWHERE FOR RETRIEVAL.