Sub å®1() Randomize For i = 1 To 10 Cells(i, 1) = Int(10 + Rnd * 90) Next With ActiveWorkbook.Worksheets("Sheet1").Sort .SetRange Range("A1:A10") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub