It's up to you to choose...
We have 100 numbers in A in no paricular order. These numbers must be sorted (in ascending order) in an adjacent column by using formulas.
Method 1. SortNumsWithRank
Formula(s) involved:
=RANK(A2,$A$2:$A$101,1)+COUNTIF($A$2:A2,A2)1
=INDEX($A$2:$A$101,MATCH(ROW(1:1),$B$2:$B$101,0))
Method 2. SortNumsWithVsort
=INDEX(VSORT($A$2:$A$101,,1),ROW(1:1))
Method 3. SortNumsWithSmallArray
{=SMALL($A$2:$A$101,(ROW(INDIRECT("1:" & ROWS($A$2:$A$101)))))}
This method uses an arrayformula.
Method 4. SortNumsWithSmallOffset
=SMALL($A$2:$A$101,ROW()(IF(ISERROR(ROW(OFFSET($A$2:$A$101,1,0))),0,ROW(OFFSET($A$2:$A$101,1,0)))))
What follows shows the efficiency profile of each method...
AllProfiles.xls 



 A  B  C  D  E  F  G  H  I  J  K 

2            

3   WorkBook Summary          

4   Cell Counts  Calc Time(Millisec)  MicroSecs  Volatility  Book  Bytes 

5   UsedRange  %Waste  Constants  Formulae  ReCalc  FullCalc  perFormula  %  OvHead  per Cell 

6  SortNumsWithRank  300  0.0%  100  200  0.09  17.03  85.14  0.6%  10.16  54.24 

7  SortNumsWithVsort  200  0.0%  100  100  0.19  29.35  293.54  0.6%  14.39  282.14 

8  SortNumsWithSmallArray  200  0.0%  100  100  7.13  19.39  193.91  36.8%  11.60  36.40 

9  SortNumsWithSmallOffset  200  0.0%  100  100  7.67  20.28  202.85  37.8%  11.74  36.40 

10            



This message was edited by Aladin Akyurek on 20021102 04:55