View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula to sort text and return reference value

For your 1st question, you could use essentially the same tiebreaker set-up
concept as I had responsed in one of your earlier similar threads a few days
ago (Incidentally, you should close off the discussions over there, in that
thread. Could you?)

Source data is assumed in A1:B1 down
In C1: =IF(B1="","",CODE(UPPER(B1))+ROW()/10^10)
In D1: =INDEX(A:A,MATCH(SMALL($C:$C,ROWS($1:1)),$C:$C,0))
Copy D1 to E1. Select C1:E1, copy down to the last row of source data. Hide
away col C. Cols D and E returns an automatic alpha/ascending sort of cols A
and B, by the single letter grades in col B. Ties are fully catered for, with
returns in the same relative order that they appear within the source.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Scott" wrote:
I have a column (Column A) of text data in one column with anywhere between 1
and 144 rows of unique text data. Next, in Column B, I have another series
of text data with the same amount of rows, but contains duplicate text fields.

In Column C, I want to sort the data in Column B and return the associated
data in Column A. For one more trick, see below...

For example:

---A------B---
Name1___C
Name2___A
Name3___D
Name4___B
Name5___D
Name6___A
Name7___C
Name8___A
Name9___C
Name10__D
Name11__B
Name12__B

Now in Columns C and D I want the output to be:
---C------D
Name2___A
Name6___A
Name8___A
Name4___B
Name11__B
Name12__B
Name1___C
Name7___C
Name9___C
Name3___D
Name5___D
Name10__D

Now, finally, here's the tricky one. In Columns E and F, I want to sort the
range in an "ABCD" format. Like so:

E---F---
Name2___A
Name4___B
Name1___C
Name3___D

And so on...

What do I use to return this?

Thanks!