Sorting Using a Formula

L

Lee

Does anyone now a formula for sorting alphabetically (as apposed to using
the Data / Sort function)?s

Cheers

Lee
 
P

ProfessionalExcel.com

Say you have a list (array of cells containing text) in column A. Entering
the following formula (adusting to the size of your array) in column B will
rank them:

=COUNTIF($A$1:$A$4,"<"&A1)+1

Hope that is what you meant.

Regards,
Chris
 
L

Lee

Chris

This sort of works but not quite. I have data in column A that might read:

B
D
C
E
A

I want a formula in column B that returns the results:

A
B
C
D
E

Cheers

Lee
 
R

Robert McCurdy

I tested this with the data to be sorted in the range B3:B20.
I used a helper column, where B3 is the first entry of the name range (column) pq. I've named the helper column Hcol.

=SUMPRODUCT(N(B3>pq))+1

To sort use this formula (copy it down):

=INDEX(pq,MATCH(ROW(A1),Hcol,0))


Regards
Robert McCurdy
 
Top