
Originally Posted by
JOHN H. DAVIS
Does this help?
Sub brainzlp()
Dim i As Long, r As Range, x As Long
x = Range("A" & Rows.Count).End(3).row
Range(Cells(2, 1), Cells(x, 3)).Sort Key1:=Range("A2"), Order1:=xlDescending, Key2:=Range("B2"), Order2:=xlAscending, Key3:=Range("C2"), Order3:=xlAscending
Set r = Columns(1).Find("NO", LookIn:=xlValues, lookat:=xlWhole)
If Not r Is Nothing Then
Range(Cells(r.row, "A"), Cells(x, "C")).Sort Key1:=Cells(r.row, "C"), Order1:=xlAscending
End If
Set r = Nothing
End Sub
Just clarify me some things:
What does this means?
x = Range("A" & Rows.Count).End(3).row
What is the 3 ?
Where is the sort for YES first then No? here:
Range(Cells(2, 1), Cells(x, 3)).Sort Key1:=Range("A2"), Order1:=xlDescending
?
Bookmarks