Solved Can you sort multiple columns using Excel?

Microsoft Excel 2010 - complete product...
July 18, 2013 at 15:59:51
Specs: Windows XP Pro SP3, 3.0 Mz/1.0Gb
I have three sets of numbers that contain two columns each that I need to sort:

First Set: Column A has the item numbers and column B has unique descriptors.

Second Set: Column C has the same items numbers in the same order as Column A and Column D has the same unique descriptors as Column B but in a different order.

Third Set: Column E has the same item numbers arranged the same way as in Column A and Column C. Column F has the same unique descriptors as Columns B and D but in a different order.

I am trying to sort so that Columns A, C and E stay in the same order that they are in while Columns B, D, and F are sorted so that their sequence of unique descriptors are the same.

Each time I try, I can only sort two sets at a time.

Thank you.
Brian W


See More: Can you sort multiple columns using Excel?

Report •


✔ Best Answer
July 19, 2013 at 10:18:42
Perhpas I wasn't clear, forgive me if this is too basic, but just trying
to make sure were all on the same track:

First Select columns A & B only next,
click on the Sort button,
in the Sort by drop down box select Column B
Click OK

Both Column A and B are now sorted according to the contents of column B.

Repeat for C & D and E & F

Also give us an example of your real data.
The examples your using just aren't making sense to us.

MIKE

http://www.skeptic.com/



#1
July 18, 2013 at 17:59:14
OK, I'm confused. How can the same item numbers be in the same order in Columns A, C, and E yet the same descriptors are in different orders in B, D and F?

Do you mean that you have something like this?

	 A	B	 C	D	 E	F
1	111	A	111	B	111	C
2	222	B	222	C	222	A
3	333	C	333	A	333	B

If so, I don't see how that makes any sense, since the unique descriptors aren't associated with a specific item number.

What am I missing?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
July 18, 2013 at 19:12:34
Dear DerbyDad03,

Thank you for your response. I probably did not describe the problem correctly.

This is a sample of what I have:

A B C D E F
1 X 1 Y 1 X
2 Y 2 X 2 Z
3 Z 3 Z 3 Y

This is what I need:(The elements in Columns B, D, and F are in the same order; the order of the elements in Columns A, C, and E do not matter).

A B C D E F
1 X 2 X 1 X
2 Y 1 Y 3 Y
3 Z 3 Z 2 Z

Thank you.
Brian W


Report •

#3
July 18, 2013 at 19:46:53
Unless I'm missing something, if the order of the elements in Columns A, C, and E do not matter then sorting each set of columns individually should work:

First sort columns A & B on B
Second sort columns C & D on D
Third sort columns E & F on F

Does this not do what you want?

MIKE

http://www.skeptic.com/


Report •

Related Solutions

#4
July 19, 2013 at 09:13:34
Dear Mike,

Thank you for your response. Again, I am not explaining the problem correctly. The items in each set of columns are linked together, e.g., the "1" in Column A is linked to the "X" in Column B, etc. When sorted, they need to move as a pair.

Thank you.
Brian W


Report •

#5
July 19, 2013 at 10:03:03
I must be missing something.

Columns A and B in your Before & After look exactly the same, so nothing has to be done.

Columns C & D are sorted by Column D. (Select Columns C:D, Data...Sort...Sort by Column D)

Columns E & F are sorted by Column F. (Select Columns E:F, Data...Sort...Sort by Column F)

Those steps result in exactly the output that you've posted.

	A	B	C	D	E	F
1 	1	X	2	X	1	X
2 	2	Y	1	Y	3	Y
3 	3	Z	3	Z	2	Z

I can also get the same results with INDEX(MATCH...)) formulas, but what is wrong with using Excel's built in Sort feature?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#6
July 19, 2013 at 10:18:42
✔ Best Answer
Perhpas I wasn't clear, forgive me if this is too basic, but just trying
to make sure were all on the same track:

First Select columns A & B only next,
click on the Sort button,
in the Sort by drop down box select Column B
Click OK

Both Column A and B are now sorted according to the contents of column B.

Repeat for C & D and E & F

Also give us an example of your real data.
The examples your using just aren't making sense to us.

MIKE

http://www.skeptic.com/


Report •

#7
July 19, 2013 at 10:54:11
Hey Mike, your first step isn't needed. The output for Columns A&B is the same as the input, at least according to the sample he's posted.

We aren't being told something, that's for sure.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#8
July 20, 2013 at 06:25:14
Dear Mike and DerbyDad03,

Thank you for your assistance. Using your advice, I was able to sort the columns in the manner that I needed.

Brian W


Report •


Ask Question