View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default How to determine the text?

Eric,

Try this

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

Change the 1 to a 2 for the next lookup etc

Mike

"Eric" wrote:

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