Sub
test()
Dim
m
As
Integer
For
m = 1
To
20
Do
Until
Cells(m, 1) <> Cells(m + 1, 1)
If
Cells(m, 2) < Cells(m + 1, 2)
Then
Cells(m + 1, 2).Delete
End
If
If
Cells(m, 3) < Cells(m + 1, 3)
Then
Cells(m, 3).Delete
End
If
Cells(m, 1).Delete
Loop
If
Cells(m + 1, 1) =
""
Then
If
Cells(m, 2) < Cells(m + 1, 2)
Then
Cells(m + 1, 2).Delete
End
If
If
Cells(m, 3) < Cells(m + 1, 3)
Then
Cells(m, 3).Delete
End
If
Cells(m, 1).Delete
Exit
For
End
If
Next
m
End
Sub