Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to execute a simple sort on a selection in
Excel. The help file, as well as most of the online guides I've read have suggested using: Selection.Sort However, even if I simplify my request to the following lines, I still get the "application or user defined error" Worksheets(1).Range("A27:H38").Select Selection.sort Anybody know what's going on here? Thanks Avery |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have to specify a sort key at the minimum.
Worksheets(1).Range("A27:H38").sort Key1:=Range("A27") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Avery" wrote in message ... I'm trying to execute a simple sort on a selection in Excel. The help file, as well as most of the online guides I've read have suggested using: Selection.Sort However, even if I simplify my request to the following lines, I still get the "application or user defined error" Worksheets(1).Range("A27:H38").Select Selection.sort Anybody know what's going on here? Thanks Avery |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah, brilliant. Thank you.
Avery -----Original Message----- You have to specify a sort key at the minimum. Worksheets(1).Range("A27:H38").sort Key1:=Range("A27") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Avery" wrote in message ... I'm trying to execute a simple sort on a selection in Excel. The help file, as well as most of the online guides I've read have suggested using: Selection.Sort However, even if I simplify my request to the following lines, I still get the "application or user defined error" Worksheets(1).Range("A27:H38").Select Selection.sort Anybody know what's going on here? Thanks Avery . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting Spreadsheet Selection - Recurring Sort | Excel Worksheet Functions | |||
Ctrl-Space Column Selection No Longer Working | Excel Discussion (Misc queries) | |||
Range selection not working | Excel Programming | |||
Selection.count isnt working | Excel Programming | |||
Need a macro for selection and sort | Excel Programming |