Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the word "total" in a cell, delete row or column
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 -- Lawler ----------------------------------------------------------------------- Lawlerd's Profile: http://www.excelforum.com/member.php...fo&userid=1547 View this thread: http://www.excelforum.com/showthread.php?threadid=27057 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the word "total" in a cell, delete row or column
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 -- Regards, Tom Ogilvy "Lawlerd" wrote in message ... Thanks Ste, I did see this post. My problem is a bit more complicated by the fact that the text "Total" could be in any column, and may or may not be surrounded by other text, like "2 total", or "total 5", or may be in 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. -- Lawlerd ------------------------------------------------------------------------ Lawlerd's Profile: http://www.excelforum.com/member.php...o&userid=15473 View this thread: http://www.excelforum.com/showthread...hreadid=270570 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Last Cell" to find last row, but can't delete blank rows | Excel Discussion (Misc queries) | |||
Find the word "total" in a cell, delete row or column | Excel Programming | |||
Search "Total" in all worksheets and delete rows containing "Total" | Excel Programming | |||
Delete find "Grand Total" | Excel Programming | |||
Delete find "Grand Total" | Excel Programming |