Seek and destroy
Hi Jan,
try the following macro:
Sub DeleteSTD()
ActiveSheet.Cells(65536, 2).Select
Selection.End(xlUp).Select
LastRow = Selection.Row
For i = 4 To LastRow
If UCase(Cells(i, 2).Value) = "STD" Then
Rows(i).Delete
End If
Next
End Sub
Regards
Klaus
-----Original Message-----
I have an output sheet that I am trying to extract
information from. Trouble is it is not always in the
same
rows or the same number of rows in every output (100 rows
Max). I have identified a common factor in column B for
all the rows that are unwanted they contain STD (in
upper,
lower or mixed case) as part of the cell contents.
I need a macro that will search down column B (Cell B4
Start point) until it comes to a cell containing STD then
for it to remove that entire row from the sheet2 and
continue until all rows containing STD in column B are
removed and I am left with only the required data.
Any help on this would be most welcome.
Rrgards Jan
.
|