Thread: Sort a Range
View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default

One way ..

Set up an adjacent "tie-breaker"=20
helper col in say, col C

Put in C1: =3DIF(A1=3D"","",A1+ROW()/10^10)
Copy C1 down to C4=20
(the extent of your data-set in cols A and B)

Now, put in A5:

=3DINDEX(A$1:A$4,MATCH(SMALL($C:$C,ROW(A1)),$C:$C, 0))

Copy A5 across to B5,=20
fill down to B8
(i.e. by the number of rows in your data-set)

Format B5:B8 in currency

--
Rgds
Max
xl 97
---
GMT+8, 1=B0 22' N 103=B0 45' E
xdemechanik <atyahoo<dotcom
----
"Brandt" wrote:
Sorry Everyone, I know this one has been on here a dozen=20

times, but I cant=20
find any relating posts.

Say I have 2 columns and 4 rows of data such as:

A B =20

1 2800 $2000

2 2700 $1952

3 2940 $1700

4 2852 $2100


I want the next 3 rows to sort this from smallest to=20

largest according to=20
value in column A. I have a fixed # of data points (3 in=20

this example) and=20
would like to use formulas rather than the sort command=20

so that I can have a=20
x-y scatter plot of the sorted data that updates=20

automatically when ever new=20
data is entered up in rows 1-3. So the new data should=20

look like this:

A B =20

5 2700 $1952

6 2800 $2000

7 2852 $2100

8 2940 $1700

I know this can be done with the vlookup for the column b=20

part once I have=20
ranked column A, but I don't know how to find the 2nd=20

largest (or nth=20
largest) or 2nd smallesst value. In reality my sheet may=20

contain up to 15=20
points so I would like to have a clean formula.

Thanks
.