Thread: Sort Macro
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
sross002 sross002 is offline
external usenet poster
 
Posts: 29
Default Sort Macro

Thank you both!

But I can't find the "schemes, patterns" button on the Forms toolbar that
SVERRE mentioned.

"Sverre" wrote:



sross002 skrev:

Can someone please help me create a button (macro) that will sort a column in
desending order? Basically I just want to push a button and have column "b"
sort in desending order.

Thanks! I am new to Macros.


Try this one:

Sub SorterB()
Columns("B:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub

After you have saved the VSB right clikk the mouse on tools and choose forms
(scheme, pattern). Click on the butten yoy want to appere. Then click the
place in the sheet you want to place it. The rest I thing you can manage.
By the way- the easy way to du it is to record a macro.
If you do any help to do that let me know