Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Spreadsheet Sorts When Saved
I know there is a way to have a spreadsheet sort the information you add in
to it when you save the spreadsheet. However, I cannot find the path that leads me to this option. How do I do that? |
#2
|
|||
|
|||
"Dena" wrote in message ... I know there is a way to have a spreadsheet sort the information you add in to it when you save the spreadsheet. However, I cannot find the path that leads me to this option. How do I do that? Sort of wondering out loud, but....how about a macro that runs when the sheet is closed? |
#3
|
|||
|
|||
Dena-
There is no built-in function that does this for you. However as Doug K's post suggests, you can instruct Excel to perform tasks (in a macro) when certain spreadsheet events occur, such as opening the file, closing the file, etc. Do you know how to record macros? Dave O |
#4
|
|||
|
|||
Hi Dave,
No, never run a macro before. Is there a wizard that can walk me through it? "Dave O" wrote: Dena- There is no built-in function that does this for you. However as Doug K's post suggests, you can instruct Excel to perform tasks (in a macro) when certain spreadsheet events occur, such as opening the file, closing the file, etc. Do you know how to record macros? Dave O |
#5
|
|||
|
|||
Some background info: a macro is a type of program that runs within
Excel. (You can run macros in Word and Access too, but let's concentrate on Excel for now). When you perform a function on your spreadsheet, such as sorting, you are following certain steps: choose a range to sort, choose a column to sort on, etc. Excel allows you to *record* those steps and save them in a macro, so instead of slogging through all the steps every time, you can simply instruct Excel to run your Sort macro. Excel then runs the little program and ta-da, your data gets sorted. Macros can be tricky because they will do EXACTLY what you tell them to do, so if you make a mistake when you record it, that error will be repeated when you run the macro. So you have to be very careful when you record, or learn to edit the macro- which is likely to be VERY tricky. If you'd like to try it, take the file you're working on- I'm guessing you're at work and would rather not accidentally delete information- and click File Save As and rename the file to Dena Test File.xls or something similar. That way you can practice all you'd like and not delete stuff. In your saved file, click Tools Macro Record new macro, and enter a name for your macro or use the default name provided and click OK. You're recording now: do all the steps you usually do to sort your data, for instance. When you've performed the sort, click Tools Macro Stop recording. The macro is saved- but you have to click File Save to permanently save the changes to the file and the macro. Now, change some of the data you sorted- make some obvious changes. Then click Tools Macro Macros and highlight your macro, and select Run. You'll see the screen flash as Excel sorts your data. Let me know how it goes! |
#6
|
|||
|
|||
"Dave O" wrote in message
ps.com... Macros can be tricky because they will do EXACTLY what you tell them to do... .....and it also does "it" WHEREVER you told it to when you record the macro. So, if you select a group of cells, but later, the range you want to work on gets larger or smaller, you'll need a way for the macro to know that. One method is to name the range of cells, and then edit the macro so instead of looking for A1 through B12, it looks for a named range called "SortArea", or some such thing. Named ranges are immensely valuable. Select a group of cells, then click Insert, Name, Define. Your imagination may tell you some ways for using this. It's especially handy for making formulas easier to read. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I display the last saved date in an EXCEL spreadsheet? | Excel Discussion (Misc queries) | |||
How can I retrieve a spreadsheet closed out of (not saved)? | Excel Worksheet Functions | |||
How can I retrieve a spreadsheet closed out of (not saved)? | Excel Worksheet Functions | |||
How to get saved old saved work that was saved over? | Excel Discussion (Misc queries) | |||
Can I unsave a spreadsheet once it has been saved | Excel Discussion (Misc queries) |