Stop being so prolific Harlan!<g>
I'm having a hard time keeping up with copying all your formulas to my
"SaveIt" file!
--
Regards,
RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------
Bill wrote...
I would like to sort a list of text that is created using lookup
functions. The list is dynamic. I need to use formulas. . . .
If your derived list were in A1:A24 and could include text and numbers,
and you want to display numbers before text, then enter the following
*array* formulas.
B1:
=INDEX($A$1:$A$24,MATCH(0,MMULT(--($A$1:$A$24
TRANSPOSE($A$1:$A$24)),ROW($A$1:$A$24)^0),0))
B2:
=IF(SUMPRODUCT(--($A$1:$A$24=B1))
MATCH(COUNTA(B$1:B1),MMULT(--($A$1:$A$24
TRANSPOSE($A$1:$A$24)),ROW($A$1:$A$24)^0),0)))
Select B2 and fill down into B3:B24. This will also sort any TRUE or
FALSE values in your derived list to the bottom of the list.
If your derived list contained only text, then you could use the array
formulas
B1:
=INDEX($A$1:$A$24,MATCH(0,
COUNTIF($A$1:$A$24,"<"&$A$1:$A$24),0))
B2:
=IF(COUNTIF($A$1:$A$24,B1)>COUNTIF(B$1:B1,B1),B1,
INDEX($A$1:$A$24,MATCH(COUNTIF($A$1:$A$24,"<="&B1),
COUNTIF($A$1:$A$24,"<"&$A$1:$A$24),0)))
again selecting B2 and filling down into B3:B24. It's much easier if
your derived list contains all numbers.
B1 [not an array formula]:
=MIN($A$1:$A$24)
B2 [array formula]:
=IF(COUNTIF($A$1:$A$24,B1)>COUNTIF(B$1:B1,B1),B1,
MIN(IF($A$1:$A$24>B1,$A$1:$A$24)))
again selecting B2 and filling down into B3:B24.