Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is MUCH easier than you might think and doesn't require a macro if you can believe that!! First you need to set up a custom list of the column names in the order you want them to appear sorted in. To do this go to Tools\Options\Custom Lists. Once you are there enter the column names in the "List entries" box in the correct sort order separated by a comma and then click the "Add" button to the right and then the "OK" button. Second highlight the columns you want to sort and select Data\Sort when the Sort dialog box opens select "Options" at the bottom of the dialog box. In the Sort Options dialog box that opens select the custom list you just created from the drop down box "First key sort order". Then click the radio button "Sort left to right" and click "OK". Now make sure that the "Sort by" drop down box on the "Sort" dialog says "Row 1" and the "Ascending" radio button next to it is selected. Click "OK" and your columns are sorted in the order you want them. T De Villiers Wrote: Hi, I have 5 columns with 5000 rows. Column Headings a C1, C2, Account, Amount, Type I need to write a macro which will sort data by Column to: Account, Type, Amount, C1, C2 Many Thanks -- Excelenator ------------------------------------------------------------------------ Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768 View this thread: http://www.excelforum.com/showthread...hreadid=565069 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort by color: Is there an easy way to sort columns or rows in EX | Excel Worksheet Functions | |||
sort by two columns ends up with wrong sort in 2nd col | Excel Discussion (Misc queries) | |||
Sort command does not sort some columns? | New Users to Excel | |||
How do I sort the data in 8 columns by two of the columns? | Excel Worksheet Functions | |||
data sort is not including all columns in sort | Excel Discussion (Misc queries) |