View Single Post
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Let A1:B100 house the data, including the labels in A1:B1.

C1: Rank

C2, copied down:

=RANK(B2,$B$2:$B$100)+COUNTIF($B$2:B2,B2)-1

D1, List

D2, copied down:

=INDEX($A$2:$A$100,MATCH(ROW()-ROW(D$2)+1,$C$2:$C$100,0))

BobT wrote:
column A is labels
column B is values
and I want output a sorted list without macros.
This is pretty easy if there are no duplicate values, but
I've been using
Column C. rank(B:B,switch)+row()/70000 to eliminate
duplicates
Column D. rank(C:C,switch)
Column E. match(row(1:1),C:C,0)
Column F. indirect("A"&[row from column E])
Column G. indirect("B"&[row from column E])
So I have 3 intermediate columns between input and output
Besides the obvious copypastesort and without macros,
is there a quicker way to do this?