Currently my code only sorts row with containing all "A" in range(E20:I20 till last row) and but I want "A" sorted on top if any row contains "A" within range(E20:I20 till last row). I am stuck with it. Any help is welcome.
Sub SortA()
Range("A19").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Add Key:=Range("E20:E" & Range("E" & Rows.Count).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:="A", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Add Key:=Range("F20:F" & Range("F" & Rows.Count).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:="A", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Add Key:=Range("G20:G" & Range("G" & Rows.Count).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:="A", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Add Key:=Range("H20:H" & Range("H" & Rows.Count).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:="A", DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Phop").Sort.SortFields.Add Key:=Range("I20:I" & Range("I" & Rows.Count).End(xlUp).Row), SortOn:=xlSortOnValues, Order:=xlAscending, CustomOrder:="A", DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Phop").Sort
.SetRange Range("A19:J" & Range("A" & Rows.Count).End(xlUp).Row)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A20").Select
End Sub