Sub orderList()
Range("A1").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
:=xlPinYin
End Sub
Sub countdata()
Dim rcount As Long
Range("C1").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(C[-1],RC[-1])"
rcount = Cells(1, 1).End(xlDown).Row
Selection.AutoFill Destination:=Range("C1:C" & rcount), Type:=xlFillDefault
Range("C1:C" & rcount).Copy
Range("D1:D" & rcount).PasteSpecial Paste:=xlPasteValues
End Sub
Sub deldata()
Dim i As Long
With Range("B1")
For i = .CurrentRegion.Rows.Count To 1 Step -1
If .Offset(i, 0) = .Offset(i - 1, 0) Then .Offset(i, 0).EntireRow.Delete
Next i
End With
Range("C:C").Delete
End Sub