Share via

Excel sorting problem

Anonymous
2018-09-11T10:05:35+00:00

Hey all,

I have a small excel problem I need your help with.

Attached you will find the file I am talking about.

In colum A you can see a random but unique strings containing letters and numbers and in colum B I got a subset of these strings in a random order. The subset in row B has numbers allocated to it shown in colum C.

Example:

the combination 6F 2A 83 05 09 00 12 E0  corresponds to the number 1 and the combination 63 2F 83 05 09 00 12 E0 corresponds to the number 5.

Using the formula =IFERROR(VLOOKUP(A6;B$2:B$123456;1;0);"") I manged to sort my radom subset (colum B) in a way that it corresponds to colum A. So the same strings are now next to each other (Colum A and D).

Yet it is hugly important that I dont lose the corresponding numbers in colum C. Since I did not come up with the IFERROR formula myself I am not sure how to change it according to my new porblem :)

So what I now need is what you can see in colum E. So I still need the strings in colum D corresponding to my numbers in colum E.

In short, what I got is colums A B C and I need as a result the colums A D E.

Since I cant attach an Excel file (which is weird in an Excel help forum btw.) I have to attach an image of my file:

I hope you can help me :)

Greetings

MrMoody

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Andreas Killer 144.1K Reputation points Volunteer Moderator
2018-09-11T10:16:03+00:00

No need to sort column B.

D2: =IFERROR(INDEX(B:B,MATCH(A2,B:B,0)),"")

E2: =IF(D2="","",VLOOKUP(D2,B:C,2,0))

and drag down to the end of your data

Andreas.

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2018-09-11T11:22:16+00:00

    You are amazing, Thank you!

    Was this answer helpful?

    0 comments No comments