Find the word "total" in a cell, delete row or column

  • Thread starter Thread starter Lawlerd
  • Start date Start date
L

Lawlerd

Thanks Ste,
I did see this post. My problem is a bit more complicated by the fac
that the text "Total" could be in any column, and may or may not b
surrounded by other text, like "2 total", or "total 5", or may be i
mixed case "Total". I tried changing the code to "*total*" hoping the
would act as a wild card before or after the text...Didn't seem to work
If anyone else has time to help I'd appreciate it. Thanks again.
:rolleyes
 
Sub Macro1()
Set rng = Cells.Find("total", LookIn:=xlValues, LookAt:=xlPart)
Do While Not rng Is Nothing
rng.EntireRow.Delete
Set rng = Cells.FindNext(Range("A65536"))
Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top