View Single Post
  #7   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 your suggestions

The set order is based on following order:
BOY (first priority on selection),
APPLE (second priority on selection),
CAT (third priority on selection)
so you cannot sort them based on TEXT,
For sorting TEXT based on characters, "APPLE" is less than "BOY", but the
given rule shows "BOY" is greater than "APPLE" and "APPLE" is greater than
"CAT".

For the C column,
=IF(A1="","",A1+ROW()/10^10)
which only add extra value at the end in order to differentiate the same
numbers for ranking, but I would like to sort and rank the defined TEXT, not
the number.

All 1 under column A contains , APPLE (second), BOY (first), CAT (third)
under column B, then I prefer to select BOY based on the given rules.

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

For the number 1, which contains "APPLE","BOY" AND "CAT",
based on the given rule, the largest priority is "BOY", because it is the
first selection, so "BOY" will be selected and return in cell E1.

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

[3] 2 APPLE selected
[6] 2 CAT

For the number 2, which contains "APPLE" AND "CAT",
based on the given rule, the larger priority is "APPLE", because it is the
second selection, so "APPLE" will be selected and return in cell E2.

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

[4] 3 CAT
[7] 3 APPLE selected

For the number 3, which contains "APPLE" AND "CAT",
based on the given rule, the larger priority is "APPLE", because it is the
second selection, so "APPLE" will be selected and return in cell E3.

Doo you have any suggestions?
Thank you very much for any suggestions
Eric

[A] [b] [C] [D]
1 APPLE 1 APPLE
1 BOY 1 BOY
2 APPLE 2 CAT
3 CAT 3 APPLE
1 CAT 1.000000001 CAT
2 CAT 2.000000001 CAT
3 APPLE 3.000000001 APPLE


"Max" wrote:

Ah, if you want to return the source col A as well into col E, just point the
INDEX part to col A, viz, in E1:
=IF(ROW()COUNT(C:C),"",INDEX(A:A,MATCH(SMALL(C:C, ROW()),C:C,0)))
Copy down. Solved? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Eric" wrote:
There is the result for your suggestions as shown below, but I would like to
select BOY for 1 and return in cell E1, APPLE for 2 and return in cell E2,
and APPLE for 3 and return in cell E3, there is missing the selection process
based on your formula, which is the tough part and I don't know how to do it.
Do you have any suggestions on how to do it in Excel?