Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using ExcelXP(2003), and frequently do data sorts, like Column A first,
then Column B, then press "sort". But I have to keep entering this every time. Isn't there a way to "save" the sort along with saving the spreadsheet? Thanks, George |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you tried recording a macro?
"George" wrote: I'm using ExcelXP(2003), and frequently do data sorts, like Column A first, then Column B, then press "sort". But I have to keep entering this every time. Isn't there a way to "save" the sort along with saving the spreadsheet? Thanks, George |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am not sure about saving the sort, but you could write a macro to do
the sort...hit the record button under tools Macro, then hit stop after you are done....then run it when you want...good luck! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The easiest way is to record a macro. Something that you do frequentl can be automated by simply using Tools|Macro|Record new macro. Then just do your repetitive function and stop the recording. For your example, I highlighted my data to get the selection before th macro started so the selecting would not be part of the macro. Then, hit Tools|Macro|Record new macro. Then, Data|Sort and filled it ou how I wanted. Sorted and stopped the macro. The resulting code was: Code ------------------- Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Key2:=Range("B3") _ , Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal ------------------- Not too bad. Pretty easy. From there, you edit the code if you wan or leave it as-is. If I did it frequently enough, I would create a toolbar button for th macro. Fun stuff. Good luck -- cm_gmai ----------------------------------------------------------------------- cm_gmail's Profile: http://www.excelforum.com/member.php...fo&userid=3345 View this thread: http://www.excelforum.com/showthread.php?threadid=53259 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks,
Macro looks like a good way to go, but I was hoping to find a non-macro way. So far, haven't found. What's really baffling is that I've pulled up some old spreadsheets, and the sort is exacltly like I want upon opening the file (let's say it's sort on 1st-ColumnB, 2nd-ColumnA, 3rd, ColumnG. But spreadsheets created more recently (past year or 2 or 3) don't "hold" the sort...even if you save the file. Once you exit and then re-open, it flops back to some default like blank spaces for the sort fields. Still looking, George |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 | Excel Discussion (Misc queries) | |||
Missing sort ascending or descending when go into "data" "sort"? | Excel Discussion (Misc queries) | |||
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION | Excel Discussion (Misc queries) | |||
"Save" and "Save As" options greyed out - "Save as Webpage" option | Excel Discussion (Misc queries) | |||
"Subscript out of range" error for: Workbooks("Test1.xls").Save | Excel Programming |