sort a list using functions

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

I have a list of two columns:

A 1
C 2
B 3
D 4

I would like to do a "sort" on the first column (which is
text), using functions. The result should be:

A 1
B 3
C 2
D 4

It would be fine if the sorted list ended up in a new
destination. Is there a way to do this using functions
(not by highlighting and using mouse commands)? I cannot
figure out how to do so. I do not want to write a macro,
etc.

Thanks in advance.
 
Aaron said:
I have a list of two columns:

A 1
C 2
B 3
D 4

I would like to do a "sort" on the first column (which is
text), using functions. The result should be:

A 1
B 3
C 2
D 4

It would be fine if the sorted list ended up in a new
destination. Is there a way to do this using functions
(not by highlighting and using mouse commands)? I cannot
figure out how to do so. I do not want to write a macro,
etc.

Functions could only put the sorted result in a different range. While
there's no text equivalent to SMALL and LARGE, it's possible to use COUNTIF
to do this. If your original data were in A1:B4, select D1:E4 and enter the
array formula

=INDEX(A1:B4,MATCH(SMALL(COUNTIF(A1:A4,"<"&A1:A4&"*"),
ROW(A1:A4)-CELL("Row",A1:A4)+1),COUNTIF(A1:A4,"<"&A1:A4&"*"),0),{1,2})
 
Back
Top