Columns("A:A").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlPinYin, DataOption1:=xlSortNormal
Dim i As Long
i = 1
Do While Cells(i, 1) <> ""
If Cells(i + 1, 1) = "" Then
Cells(i, 1) = Cells(i, 1) - 15
i = i + 1
ElseIf Cells(i + 1, 1) - Cells(i, 1) < 11 Then
Cells(i + 1, 1) = Cells(i + 1, 1) - 20
Cells(i, 1) = Cells(i, 1) - 10
i = i + 2
Else
Cells(i, 1) = Cells(i, 1) - 15
i = i + 1
End If
Loop
End Sub