Thread: Sort help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard Daniels Richard Daniels is offline
external usenet poster
 
Posts: 19
Default Sort help

Hi Todd

create a button on the sheet you want to sort, then add
this code to the click event

Private Sub CommandButton1_Click()
With CommandButton1.Parent
Range("c4:an4").Select
Selection.Sort Key1:=Range("C4"),
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal
End With
End Sub

Richard Daniels

-----Original Message-----
Ive got a worksheet with a table. On row 4 I have
different categorys. What is the code I would use for

it
to look in Row 4 starting with column C and sort
alphabetical? My data goes from column C to Column AN

in
row 4. I would like to have the code inserted into a
button so I can just click and it sort.

Thank you

Todd Huttenstine

.