How do I delete some rows while keeping others
There's a few ways to approach this, but a simple one would go
something like:
Public Sub DeleteRows()
Range("A1").Select
Do Until ActiveCell.Value = Empty
If ActiveCell.Value = "Value I don't want" Then
ActiveCell.EntireRow.Delete shift:=xlUp
ElseIf ActiveCell.Value = "Another value I dont want" Then
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub
Daryl Timm wrote:
Every day I receive a list like the following:
9 - spice
7 - aurora
5 - dallas
4 - tulsa
4 - frank
4 - eville
3 - waco
3 - pont
2 - warren
2 - ripon
2 - quincy
2 - lakep
2 - gulf
2 - gretna
2 - george
2 - birm
1 - wmemph
1 - winch
1 - wfalls
1 - sulliv
1 - sioux
This list includes many entries that don't concern me, but a few of them do.
The numbers preceding the "- text" change every day, but the text does not
change. I would like to be able to delete the rows that don't concern me,
how would I go about doing this?
Thanks!
|