Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I sort multiple columns in Excel? So first sort culumn B and then A, D

share|improve this question

migrated from Nov 26 '09 at 20:27

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

You can sort on as many columns as you like with any version of Excel, by sorting 1 column at a time, in the reverse order.
E.g: if you need a sort on col. B, F, C, A in that order of precedence, just sort on A, then on C, then on F, then on B.

share|improve this answer
This is the best answer. In excel 2003, you are limited to three sorted keys. I am not sure if that has been changed in excel 2007. If you sort from "last to first" in sequence, you can sort by any number of columns. – Kije Nov 26 '09 at 21:45
@Kije, you're no more limited in Excel 2003 than any other version. Just select a cell in the lowest-priority column, hit sort, select a cell in the next priority, hit sort, rinse and repeat until done. – Martha Oct 21 '10 at 18:47

This is barely programming related, but none the less here is how you do it:

If you're running Excel 2007, mark the area you want to sort, select the "data" tab, hit "sort" and then choose how you want to sort your data. To add more levels of sorting, hit the "Add level"-button.

share|improve this answer

Select the data

File -> Data -> Sort

I think you can only sort by upto 3 columns....

share|improve this answer

It's possible. if u try in Excel 2007. Select the columns and data tab and hit Sort tab and in the Sort tab which column you require first, last or whatever prefernece you like and whether it is asc or desc, we can choose from "Add Level" button. It works more than 3 !

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .