Attaching labels when using large or small functions

B

BobT

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 copy>paste>sort and without macros,
is there a quicker way to do this?
 
A

Aladin Akyurek

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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top