Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Updating workbook with an alpha sort sheet and a numeric sort shee | Excel Discussion (Misc queries) | |||
Sort by color: Is there an easy way to sort columns or rows in EX | Excel Worksheet Functions | |||
sort function for dates does not sort properly in Office 2007 Exc. | Excel Worksheet Functions | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
Excel Sort function should not sort the cell formatting! | Excel Worksheet Functions |