mrt
mrt

Reputation: 223

How to match the ordering and sorting of multiple columns in Excel

I have data that look like this (going on for many more rows):

enter image description here

What I want to do is:

  1. Match the relationship of C and G to the relationship of I and J.

For example, I:Q1652 matches up with J:Q1662; therefore, C:Q1652 should also match up with G:Q1662.

  1. At the same time, A & B and E & F should maintain their relationships with C and G, respectively

For example, when C:Q1652 and G:Q1662 are being matched, they should carry with them their respective rows/values from columns A & B and E & F.

Please let me know if there's anything more I can clarify! Thanks!

Upvotes: 0

Views: 76

Answers (1)

PaichengWu
PaichengWu

Reputation: 2689

Please see K1:N1 cells in the below graph.

  • K1: =INDEX(A:A,MATCH($I1,$C:$C,0))
  • L1: =INDEX(B:B,MATCH($I1,$C:$C,0))
  • M1: =INDEX(E:E,MATCH($J1,$G:$G,0))
  • N1: =INDEX(F:F,MATCH($J1,$G:$G,0))

enter image description here

Upvotes: 1

Related Questions