ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   remove contain from rows B thur J (https://www.excelbanter.com/excel-worksheet-functions/254606-remove-contain-rows-b-thur-j.html)

bill boch

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

Don Guillett[_2_]

remove contain from rows B thur J
 
Sort or datafilterautofilterfilter for RSdelete
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bill boch" wrote in message ...
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


Eduardo

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
.



All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com