View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default I need to sort an active sheet using the col of the active cell

One way:
Sub SortByActiveCellColumn()
Selection.Sort Key1:=Cells(2, ActiveCell.Column), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
I assumed your data has headers. Also, you have to select the entire range
you want sorted before you run this macro. Post back if you want help with
refining this to work with what you actually have. HTH Otto
"HamFlyer" wrote in message
...
My intent is to create a Sort Button that will read the Active Column for
sorting the ActiveSheet.