Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting
How do I go about setting up a single cell at the top of the worksheet that
with one click, it will sort the whole table? They have it set up to do that with the worksheets at work and I'd like to be able to do it here at home. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting
all you have to do is go to tools--macros--record macros
then you highlight either the whole table or just the column you want to sort. when you're done, click on the stop button. save the macro. go to the control toolbar and create a button. right click on the button and go to view code. go to tools--macro and select your macro and click on edit...highlight the text that's in black and insert that into the other window which says private sub commandbutton1_click. save and this should be it. the code should look something like this: Private Sub CommandButton1_Click() Cells.Select Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub "FloatingBubbles" wrote: How do I go about setting up a single cell at the top of the worksheet that with one click, it will sort the whole table? They have it set up to do that with the worksheets at work and I'd like to be able to do it here at home. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting
Hi
If your'e not into macros, there's an easier way: Data-filter-autofilter. Don't know if the're the same in english, but Data- then the second line, then follow the arrow and then click the first line. I think this is what you mean, it'll show a little button on the top of each row to sort the data. Hop you can use it. Therese "FloatingBubbles" skrev: How do I go about setting up a single cell at the top of the worksheet that with one click, it will sort the whole table? They have it set up to do that with the worksheets at work and I'd like to be able to do it here at home. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting
Whether you use a macro, do your sort manually, or use the sort button, or your own button
you probably want to select all cells on the worksheet or use cells. for the range; otherwise you are putting your data at risk. Read about sorting and why you do not want to select one cell, and use the current range Ctrl+* based on a single cell. 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 "FloatingBubbles" wrote in message ... How do I go about setting up a single cell at the top of the worksheet that with one click, it will sort the whole table? They have it set up to do that with the worksheets at work and I'd like to be able to do it here at home. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
sorting non contiguous ranges | Excel Discussion (Misc queries) | |||
sorting number in ascending order | Excel Discussion (Misc queries) | |||
SORTING question | New Users to Excel | |||
Adding a KeyID column for sorting | New Users to Excel |