Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting all rows that match a pattern


How can I delete every row (and move all following rows up) tha
containts "-66-" somewhere in column B?

For example:

333-66-2219 'delete
333-22-1134 'leave as is
331-66-3562 'delete

I need this to run on both "Sheet1" and "Sheet2"...

Thanks so much!
Elieze

--
Laze
-----------------------------------------------------------------------
Lazer's Profile: http://www.excelforum.com/member.php...nfo&userid=750
View this thread: http://www.excelforum.com/showthread.php?threadid=27287

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Deleting all rows that match a pattern

Hi
see:
http://www.xldynamic.com/source/xld.Deleting.html

in your case use also the isntr method. e.g.
If instr (<range<,"66")0 then
'delete
end if


--
Regards
Frank Kabel
Frankfurt, Germany


Lazer wrote:
How can I delete every row (and move all following rows up) that
containts "-66-" somewhere in column B?

For example:

333-66-2219 'delete
333-22-1134 'leave as is
331-66-3562 'delete

I need this to run on both "Sheet1" and "Sheet2"...

Thanks so much!
Eliezer

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
Deleting Rows in A Pattern DyingIsis Excel Discussion (Misc queries) 1 May 30th 08 10:23 PM
Deleting Rows in a Pattern DyingIsis Excel Discussion (Misc queries) 0 May 29th 08 03:08 PM
Deleting Rows In A Pattern DyingIsis Excel Discussion (Misc queries) 0 May 28th 08 04:21 PM
Removing (deleting, filtering) lines in a pattern . . . Wayne Knazek Excel Discussion (Misc queries) 6 July 26th 06 08:49 PM
Deleting rows which match filter Fred Smith Excel Programming 2 February 13th 04 02:24 AM


All times are GMT +1. The time now is 04:39 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"