E

#### Eric

There is a list of data under column A and there is a list of text under

column B

For example

[1] 1 abc

[2] 1 dcb

[3] 2 abc

[4] 3 tes

[5] 1 tes

[6] 2 tes

[7] 3 abc

I would like to select the text based on following order:

dcb (first), abc (second), tes (third)

For 1, it should return dcb in cell C1, because there is dcb in cell A2, and

this belongs to the first order, so the other order on abc (second) and tes

(third) will be ignored.

For 2, it should return abc in cell C2, because there is abc in cell A3, and

this belongs to the second order, the other order tes (third) will be ignored.

For 3, it should return abc in cell C3, because there is abc in cell A7, and

this belongs to the second order, the other order tes (third) will be ignored.

Does anyone have any suggestions on how to do it in Excel?

Thanks in advance for any suggestions

Eric