下面这个宏是按规定动作录制的,可以满足要求.
Sub Macro()
Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B50"), Type:=xlFillDefault
Range("B1:B50").Select
Selection.FormulaR1C1 = "=RAND()*(141-90)+90"
Range("B1").Select
Range("A1:B50").Sort Key1:=Range("B1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
SortMethod:=xlPinYin, DataOption1:=xlSortNormal
End Su