Microsoft Excel 2010 - complete product...

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

✔ 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

onlynext,

click on the Sort button,

in the Sort by drop down box select Column B

Click OKBoth 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

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 BIf 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.

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 YThis 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 ZThank you.

Brian W

Unless I'm missing something, if the order of the elements in Columns A, C, and E do not matterthen sorting eachsetof columns individually should work:First sort columns A & B on B

Second sort columns C & D on D

Third sort columns E & F on FDoes this not do what you want?

MIKE

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

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 ZI 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.

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

onlynext,

click on the Sort button,

in the Sort by drop down box select Column B

Click OKBoth 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

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.

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

Ask Your Question

Weekly Poll

Do you think Microsoft can save the Surface Book lineup?

Discuss in The Lounge

Poll History