4
2
I am attempting to sort a short column of values (descending) by using a formula in a different column. So if A1 through A10 contain numbers, in B1 I enter:
=LARGE($A$1:$A$10,ROWS($1:1))
and copy down:
As you see, this is the formula equivalent to copying column A to column B and then sorting B using Sort from the Ribbon.
If the values in column A are Text, I can do the same thing by using:
=LOOKUP(1,0/FREQUENCY(ROWS($1:1),COUNTIF($A$1:$A$10,">="&$A$1:$A$10)),$A$1:$A$10)
and copying down:
My problem is devising a formula that will handle both text and numbers. Here is an example of data in A and expected results in B:
10 zeta
alpha gamma
zeta beta
alpha alpha
2 alpha
beta 10
1 4
gamma 4
4 2
4 1
This is easy with VBA, but I need a solution with worksheet formulas only.
Why you don't use the Sort from the Ribbon descending it will do it – None – 2016-05-22T19:57:37.773
@SuperSam I am trying to get a formula to sort exactly like Sort from the Ribbon sorts. – Gary's Student – 2016-05-22T20:38:18.423