View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Eric Eric is offline
external usenet poster
 
Posts: 1,670
Default How to determine the text selection?

Thank you very much for suggestions
Could you please provide more detailed description on how to retrieve
BOY for 1,
APPLE for 2, and
APPLE for 3?

Thank you very much for any suggestions
Eric





"Max" wrote:

One way to drive out the ascending list by priority using a tiebreaker criteria
With priority indications in A1 down, items in B1 down (as per post)
In C1: =IF(A1="","",A1+ROW()/10^10)
In D1:
=IF(ROW()COUNT(C:C),"",INDEX(B:B,MATCH(SMALL(C:C, ROW()),C:C,0)))
Copy C1:D1 down to cover the max expected of source data, say down to D50?
Hide/minimize col C. Col D returns the required results. Items indicated with
the same priority (ties) will appear in the same relative order that they are
within the source. Any good? Hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"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 APPLE
[2] 1 BOY
[3] 2 APPLE
[4] 3 CAT
[5] 1 CAT
[6] 2 CAT
[7] 3 APPLE


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:
BOY (first priority on selection),
APPLE (second priority on selection),
CAT (third priority on selection)

I would like to select the text according to the numbers based on higher
priority for selection and return it under column C

If any 1 under column A contain more than 3 types of text as shown above,
then
I prefer to select BOY in cell C1.

[1] 1 APPLE
[2] 1 BOY selected
[5] 1 CAT

If any 2 under column A contains APPLE (second), CAT (third) under column B,
then I prefer to select APPLE in cell C1, because the APPLE has a higher
priority for
selection in cell C2.

[3] 2 APPLE selected
[6] 2 CAT

If any 3 under column A contains APPLE (second), CAT (third) under column B,
then I prefer
to select CAT in cell C1, because the APPLE has a higher priority for
selection in cell C3.

[4] 3 CAT
[7] 3 APPLE selected