How to determine the text?

E

Eric

Does anyone have any suggestions on how to determine the text?

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
 
M

Mike H

Eric,

Try this

=VLOOKUP(1,A1:B7,2,FALSE)

Change the 1 to a 2 for the next lookup etc

Mike
 
E

Eric

I try to reword my statement.
There is a list of numbers under column A
1,1,2,3,1,2,3
There is a list of texts under column B, but the set order is based on
following order: dcb (first), abc (second), tes (third)
If 1 under column A contains more than 3 types of text as shown above, then
I prefer to select dcb in cell C1.
If 1 under column A contains abc (second), tes (third) under column B, then
I prefer to select abc in cell C1, because the abc has a higher priority for
selection in cell C1.
If 1 under column A contains tes (third) only under column B, then I prefer
to select tes in cell C1, because the tes is the only choose for selection in
cell C1.

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric




Mike H said:
Eric,

Try this

=VLOOKUP(1,A1:B7,2,FALSE)

Change the 1 to a 2 for the next lookup etc

Mike

Eric said:
Does anyone have any suggestions on how to determine the text?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top