#1   Report Post  
Posted to microsoft.public.excel.misc
FloatingBubbles
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
j
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
T
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
sorting non contiguous ranges gsh20 Excel Discussion (Misc queries) 1 September 8th 05 04:50 PM
sorting number in ascending order Janice Lee via OfficeKB.com Excel Discussion (Misc queries) 2 April 8th 05 10:31 PM
SORTING question Rebecca New Users to Excel 3 February 24th 05 05:35 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 07:09 PM


All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"