ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a better Sort than Excel's default Sort? (https://www.excelbanter.com/excel-programming/432428-there-better-sort-than-excels-default-sort.html)

Nick

Is there a better Sort than Excel's default Sort?
 
Hi Gurus,
Is there a way to make sorting a selection easier? For example, is
there a way to simply select a list of data in a column, right-click
or press a button/code, and have the selection sorted ascending? I
tried recording a macro, but the sort always goes back to the starting
cell reference.

Our workbook is just set up with different lists of people's names in
different columns. We want to make a selection in a column, or select
multiple lists across columns, and then want the names to sort
alphabetically in the different columns from top to bottom, no header.

In Excel xp's sort, you have to go through a warning and a couple of
windows, asking if you want to expand the selection and if you have a
header, etc. This wastes time...

Thanks!

John

Is there a better Sort than Excel's default Sort?
 
Nick,
paste the macro you recorded - this will help others better understand what
you are trying to do.
--
jb


"Nick" wrote:

Hi Gurus,
Is there a way to make sorting a selection easier? For example, is
there a way to simply select a list of data in a column, right-click
or press a button/code, and have the selection sorted ascending? I
tried recording a macro, but the sort always goes back to the starting
cell reference.

Our workbook is just set up with different lists of people's names in
different columns. We want to make a selection in a column, or select
multiple lists across columns, and then want the names to sort
alphabetically in the different columns from top to bottom, no header.

In Excel xp's sort, you have to go through a warning and a couple of
windows, asking if you want to expand the selection and if you have a
header, etc. This wastes time...

Thanks!


Jim Cone[_2_]

Is there a better Sort than Excel's default Sort?
 
Try this slightly modified recorded macro.
Try it on some test data first.
It sorts only the first column of the selected data...
'--
Sub Macro1()
Selection.Columns(1).Sort Key1:=Selection(1), _
Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
--
Jim Cone
Portland, Oregon USA




"Nick"
wrote in message
...
Hi Gurus,
Is there a way to make sorting a selection easier? For example, is
there a way to simply select a list of data in a column, right-click
or press a button/code, and have the selection sorted ascending? I
tried recording a macro, but the sort always goes back to the starting
cell reference.

Our workbook is just set up with different lists of people's names in
different columns. We want to make a selection in a column, or select
multiple lists across columns, and then want the names to sort
alphabetically in the different columns from top to bottom, no header.

In Excel xp's sort, you have to go through a warning and a couple of
windows, asking if you want to expand the selection and if you have a
header, etc. This wastes time...

Thanks!


All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com