Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Jun 5, 7:32*pm, "Joerg Mochikun" wrote:
If you start the macro recorder *after* you have made your selection, the resulting code will reference the area to be sorted as 'selection' and not a fixed range address. It will be valid for any number of rows selected. Attach this macro to a button and you are done. wrote in message ... Hello, would someone be able to set me in the right direction to create a Macro to sort a seleted range, then sort when button is pressed. Range will always be column A to M, sort Desc on column I, starting at A7 (rows 1 to 6 are header) the problem being that the number of rows varies from 2 to 100 or so. Need the Macro to sort the selected area thanks. I can manage to do a macro for a set number of rows but having trouble when the number of rows varies regards Ditchy Ballarat, Australia- Hide quoted text - - Show quoted text - Thank You everyone your help has been appreciated, I have used Joerg's response as it was the easiest for me to implement, thank you for the other suggestions I will hopefully use them at a later date regards Ditchy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing selected area | Excel Discussion (Misc queries) | |||
Highlight selected area | Excel Discussion (Misc queries) | |||
Add line with macro selected area | Excel Discussion (Misc queries) | |||
Macro to Sort automatically when file/save is selected | Excel Discussion (Misc queries) | |||
Capitalizing selected area | Excel Discussion (Misc queries) |