how do i keep sort settings?

M

MsMcGyver

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
 
R

RyanH

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!
 
R

RyanH

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top