View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default SMALL/LARGE and text

Perhaps something like this:

Using this TEXT ONLY list
A1: one
A2: two
A3: three
A4: four
A5: five
A6: six
A7: seven
A8: eight
A9: nine
A10: ten

B1: (the rank to find...eg 5 means the 5th smallest

So.if B1: 5, then the 5th smallest sample list item is: "one"
These are all NON-array formulas (in sections for readability)

C1: =INDEX(A1:A10,MATCH(SMALL(INDEX(COUNTIF(A1:A10,"<" &A1:A10),0),B1),
INDEX(COUNTIF(A1:A10,"<"&A1:A10),0),0))

If there may be blanks in the range
C1: =INDEX(A1:A10,INDEX(MATCH(SMALL(INDEX(COUNTIF(A1:A 10,"<"&A1:A10)+
(A1:A10="")*10^99,0),B1),INDEX(COUNTIF(A1:A10,"<"& A1:A10)+
(A1:A10="")*10^99,0),0),0))

If there may be blanks and numbers in the range
C1: =INDEX(A1:A10,MATCH(SMALL(INDEX(COUNTIF(A1:A10,"<" &A1:A10&"")+
ISTEXT(A1:A10)*COUNT(A1:A10)+(A1:A10="")*10^99,0), B1),INDEX(
COUNTIF(A1:A10,"<"&A1:A10&"")+ISTEXT(A1:A10)*COUNT (A1:A10)+
(A1:A10="")*10^99,0),0))

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)


"FiluDlidu" wrote in message
...
I know SMALL and LARGE don't work on text. Are there alternate functions
that could sort text and find the x-th smaller/larger "value" among the
cells
of the range?