Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Last Cell" to find last row, but can't delete blank rows [email protected] Excel Discussion (Misc queries) 6 January 8th 07 11:50 PM
Find the word "total" in a cell, delete row or column Lawlerd Excel Programming 1 October 20th 04 12:02 PM
Search "Total" in all worksheets and delete rows containing "Total" mk_garg20 Excel Programming 2 July 30th 04 06:42 AM
Delete find "Grand Total" Sue Harsevoort Excel Programming 0 February 27th 04 05:20 PM
Delete find "Grand Total" Medemper Excel Programming 0 February 27th 04 04:53 PM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"