ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do i keep sort settings? (https://www.excelbanter.com/excel-programming/414733-how-do-i-keep-sort-settings.html)

[email protected]

how do i keep sort settings?
 
I have a spreadsheet that is not really used as one. It is a tally of 120
different categories so with in the spread sheet I am sorting by number of
votes say column b and then add field and the balance of a gets sorted
alphabetically. the sort box cles each section and i have to re set the
settings. can i keep it open and default the settings for this project? I am
new to 2007 excel
Thanks


RyanH

how do i keep sort settings?
 
I would setup a Custom ToolBar Button and assign this macro to it. This way
whenever you click this button it will sort the columns specified. Note:
The code below sorts Columns A then B then C, you will have to change it to
accomendate your application.

Hope this helps!
--
Cheers,
Ryan


" wrote:

I have a spreadsheet that is not really used as one. It is a tally of 120
different categories so with in the spread sheet I am sorting by number of
votes say column b and then add field and the balance of a gets sorted
alphabetically. the sort box cles each section and i have to re set the
settings. can i keep it open and default the settings for this project? I am
new to 2007 excel
Thanks


[email protected]

how do i keep sort settings?
 

Thanks Ryan I don't see the macro?
Shuree

RyanH

how do i keep sort settings?
 
Oops! This is better. I assume you have a header row, if not, just delete
the Header portion of the code


Sub SortData()

ActiveSheet.UsedRange.Sort Key1:=Range("A2"), Order1:=xlAscending, _
Key2:=Range("B2"), Order2:=xlAscending, _
Key3:=Range("C2"), Order3:=xlAscending, _
Header:=xlYes

End Sub
--
Cheers,
Ryan


" wrote:


Thanks Ryan I don't see the macro?
Shuree


[email protected]

how do i keep sort settings?
 
You Rock! In a former life i knew about macros. Apparently I forgot. Duh!
Thanks


All times are GMT +1. The time now is 06:50 AM.

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