به صورت کاملاً ساده ، در فایل ارسالی ، کافیه در سلول a2 فرمول زیر را بنویسد و درگ نمایید :
کد PHP:
=row(a1)
sub sort_b()
with sheets("sheet1").usedrange
.sort key1:=.range("b1"), order1:=xlascending, header:=xlyes, ordercustom:=1, _
matchcase:=false, orientation:=xltoptobottom, dataoption1:=xlsortnormal
end with
end sub
=row(a1)
Sub Sort_B()
With Sheets("Sheet1").UsedRange
.Sort Key1:=.Range("B1"), Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End With
End Sub
Leave a comment: