Data sort, > 3 columns

C

Clive_S

Hi

Excel has the Data sort option.

Data>> Sort
This allows you to sort 3 columns

Is it possible to sort more than 3 columns??

I would appreciate any advice.

Thanks

Clive
 
C

Clive_S

Hi

I need to be able to sort on all the fields (4 or 5 fields).
Is there a VBA script or another method??

Thanks

clive
 
S

Shane Devenshire

Hi,

4 methods at least:

1. Use Excel 2007 - it allows 64 levels of sorting
2. Put the cursor in the column which is the lowest level sort (least
important) click the Sort Ascending or Sort Descending button, move to the
next most important column and repeat the process. You can do this for any
level deep sort.
3. Using Data, Sort sort the three least important columns first, than
repeat the sort with the next most import columns.
4. If you want to sort on columns A:F in a blank column next to your data
enter a formula like =B1&A1&D1&F1&C1 (assuming the items in B are most
important) and then sort on this new column
5. Use a macro such as

Sub Sort5()
With Selection
.Sort Key1:=Range("E2"), Order1:=xlAscending
.Sort Key1:=Range("D2"), Order1:=xlAscending
.Sort Key1:=Range("B2"), Order1:=xlAscending
.Sort Key1:=Range("C2"), Order1:=xlAscending
.Sort Key1:=Range("A2"), Order1:=xlAscending
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top