Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need a code to sort a column in a excel file in ascending order. I had used
the below code Range("A1").SortSpecial SortOrder:=xlAscending but its giving error. Kindly guide me on this. Yogesh |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Why not try recording the code? Great method for getting the syntax. -- Regards, OssieMac "yogeshyl" wrote: I need a code to sort a column in a excel file in ascending order. I had used the below code Range("A1").SortSpecial SortOrder:=xlAscending but its giving error. Kindly guide me on this. Yogesh |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi yogeshyl, the code below will just sort the column only.
Columns("A:A").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortTextAsNumbers Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Arrange B values ascending order but keep attached to column A in. | Excel Discussion (Misc queries) | |||
how can i change the order(ascending, descending) in a column? | Excel Discussion (Misc queries) | |||
Sorting Data in ascending order | Excel Discussion (Misc queries) | |||
sorting number in ascending order | Excel Discussion (Misc queries) | |||
Sorting into Surname order (alphabetically ascending) | Excel Programming |