Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default remove contain from rows B thur J

In column A there are Two labels RW and RS....I need to remove the contain from rows B-J labeled RS
A B C D E F G H I J K
1 RW 11 22 88 5 6 p u r l 45
2 RS 2 57 7 6 4 r l m w 50
3 RW 45 25 4 2 8 9 t w a 90

ETC...400 rows

thanks Bill


Submitted via EggHeadCafe - Software Developer Portal of Choice
Silverlight 2 Beta 2: Doing Data Part II
http://www.eggheadcafe.com/tutorials...eta-2-doi.aspx
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default remove contain from rows B thur J

Hi
try

Sub delete_Me()
Dim copyrange As Range
Lastrow = Cells(Cells.Rows.Count, "B").End(xlUp).Row
Set MyRange = Range("B1:J" & Lastrow)
For Each c In MyRange
If InStr(c, "RS") Then
If copyrange Is Nothing Then
Set copyrange = c.EntireRow
Else
Set copyrange = Union(copyrange, c.EntireRow)
End If
End If
Next
If Not copyrange Is Nothing Then
copyrange.Delete
End If
End Sub


"bill boch" wrote:

In column A there are Two labels RW and RS....I need to remove the contain from rows B-J labeled RS
A B C D E F G H I J K
1 RW 11 22 88 5 6 p u r l 45
2 RS 2 57 7 6 4 r l m w 50
3 RW 45 25 4 2 8 9 t w a 90

ETC...400 rows

thanks Bill


Submitted via EggHeadCafe - Software Developer Portal of Choice
Silverlight 2 Beta 2: Doing Data Part II
http://www.eggheadcafe.com/tutorials...eta-2-doi.aspx
.

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
Move thur range of cells with enter key in excel Jason Excel Discussion (Misc queries) 1 January 9th 10 05:48 PM
Remove last n rows Colin Hayes Excel Worksheet Functions 6 June 12th 09 02:34 AM
calculate how many Mon, Tue, Wed, Thur, Fri, Sat & Sun in month Sunnyskies Excel Discussion (Misc queries) 1 June 19th 08 03:29 PM
remove rows in one sheet from similar rows in another G[_2_] Excel Worksheet Functions 0 November 12th 07 03:57 PM
Adding Days (i.e. Mon, Tue, Wed, Thur...) to sheet BigBadTex Excel Discussion (Misc queries) 2 November 1st 05 07:35 PM


All times are GMT +1. The time now is 06:00 PM.

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

About Us

"It's about Microsoft Excel"