Don Selecting cells
m,
Please keep your reply in the same thread.
Sub test()
Set rng = Selection
For r = rng.Rows.Count To 1 Step -1
V = rng.Cells(r, 1).Value
If rng.Cells(r, 1).Value = rng.Cells(r - 1, 1) Then
rng.Rows(r).EntireRow.Delete
End If
Next r
End Sub
Don Pistulka
"m" wrote in message
...
Dear Don
Thank you for your prompt reply, unfortunately I couldn't
use your code but you still might be able to help.
What I am trying to do is write a macro which will delete and remove
all
the rows between the first two matching numbers in a column including one
matching number, because all the data between matching numbers is repeat
data
Yours Mark
|