sorting data in order

C

ceemo

Hi,

I have the following formula to sort my data in acsending order.



=INDEX($A$1:$A$6,MATCH(SMALL(IF($A$1:$A$6="","",COUNTIF($A$1:$A$6,"<"&$A$1:$
A$6)),ROW(A1)),IF($A$1:$A$6="","",COUNTIF($A$1:$A$6,"<"&$A$1:$A$6)),0))

I am after two variations of this. One to sort in descending order and
another to sort in acsending order if the cell next to it (column b)
contains "Yes"

Please can you help,

Help always appreciated,
 
I

ivano

ceemo said:
Hi,

I have the following formula to sort my data in acsending order.



=INDEX($A$1:$A$6,MATCH(SMALL(IF($A$1:$A$6="","",COUNTIF($A$1:$A$6,"<"&$A$1:$
A$6)),ROW(A1)),IF($A$1:$A$6="","",COUNTIF($A$1:$A$6,"<"&$A$1:$A$6)),0))

I am after two variations of this. One to sort in descending order and
another to sort in acsending order if the cell next to it (column b)
contains "Yes"

hy,
try to substitute
COUNTIF($A$1:$A$6,"<"&$...
to:
COUNTIF($A$1:$A$6,"IF(B1="yes","<",">")&$...

ivano
 
Top