Home » excel » sorting – Excel: Make column B equal to column A sorted

sorting – Excel: Make column B equal to column A sorted

Posted by: admin April 23, 2020 Leave a comment

Questions:

I have a spread sheet with a large amount of numbers in column A. I want column B to contain the sorted values (from largest to smallest) of column A.

I know this can be done by copying the numbers from column A to column B, and then sort column B. Is there a way to do this automatically, without using VBA?

I want column B to update when values in column A is replaced.

How to&Answers:

Easy if we assign a rank to each value in column A. In C1 enter:

=RANK(A1,A:A,0)+COUNTIF($A$1:$A1,A1)-1

and copy down. In B1 enter:

=INDEX(A:A,MATCH(ROW(),C:C,0))

and copy down. For example:

enter image description here

There are simpler methods using either Large() or Small(), but you must be careful to insure they will handle duplicated values in column A