ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sort automatically (https://www.excelbanter.com/excel-worksheet-functions/5396-sort-automatically.html)

Mike Lemke

sort automatically
 
In previous versions of Excel, once I had run a sort I noticed that an arrow
would appear at the top of each column and that by clicking the arrow I would
be able to sort on that colum.

I purchased Office Professional last year, but this ability to sort does not
appear when I first run a sort.

Is there some feature I need to turn on to make this happen?

Don Guillett

You could try this. right click sheet tabview codecopy/paste thissave.
double click on col to sort.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
[yourrangename].Sort Key1:=Cells(1, ActiveCell.Column), Order1:=xlAscending
End Sub

--
Don Guillett
SalesAid Software

"Mike Lemke" wrote in message
...
In previous versions of Excel, once I had run a sort I noticed that an

arrow
would appear at the top of each column and that by clicking the arrow I

would
be able to sort on that colum.

I purchased Office Professional last year, but this ability to sort does

not
appear when I first run a sort.

Is there some feature I need to turn on to make this happen?




David McRitchie

Hi Mike what is seem like you had was data filters, they don't
sort but they would pick out values that you wanted.
Just noticed you posted twice and were already told that.
Those arrows are on the top row in the upper right corner
of one or more cells.

Another way of sorting would be to select all cells Ctrl+A
and then use the sort arrow on the toolbar, with the column
selected. But you will have to watch out for Excel determining
whether you have a header row or not since there is nothing
you can do to specify that. You can try to have the formatting
different from the data, but that doesn't always (or hardly ever)
work.

Using a macro such as Don supplied you would probably want
to include whether you had headers or not. More on sorting in
http://www.mvps.org/dmcritchie/excel/sorting.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Don Guillett" wrote in message ...
You could try this. right click sheet tabview codecopy/paste thissave.
double click on col to sort.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
[yourrangename].Sort Key1:=Cells(1, ActiveCell.Column), Order1:=xlAscending
End Sub

--
Don Guillett
SalesAid Software

"Mike Lemke" wrote in message
...
In previous versions of Excel, once I had run a sort I noticed that an

arrow
would appear at the top of each column and that by clicking the arrow I

would
be able to sort on that colum.

I purchased Office Professional last year, but this ability to sort does

not
appear when I first run a sort.

Is there some feature I need to turn on to make this happen?







All times are GMT +1. The time now is 06:24 PM.

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