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.
|