ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sort macro (https://www.excelbanter.com/excel-programming/385254-sort-macro.html)

bijan

sort macro
 
Hi
how i can write a macro to sort colume E sort from Ato z


merjet

sort macro
 
You can do it w/o a macro using the menu Data | Sort. If you want a
macro, use the macro recorder.

Merjet



JLGWhiz

sort macro
 
Or you can use the example in the VBA help files:

Sub SortRange()
Worksheets("Sheet1").Range("E1").Sort _
Key1:=Worksheets("Sheet1").Columns("E"), _
Header:=xlGuess
End Sub


"bijan" wrote:

Hi
how i can write a macro to sort colume E sort from Ato z


bijan

sort macro
 
thank you
it worked but i want when Excle open it automaticaly run this macro .
the name of my macro is Sort



All times are GMT +1. The time now is 12:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com