LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Macro to sort selected area

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing selected area Nunya Excel Discussion (Misc queries) 1 February 6th 08 07:16 PM
Highlight selected area dkallen Excel Discussion (Misc queries) 4 September 12th 07 04:52 PM
Add line with macro selected area doral Excel Discussion (Misc queries) 2 August 22nd 07 09:40 PM
Macro to Sort automatically when file/save is selected KDG Excel Discussion (Misc queries) 3 December 20th 05 08:28 PM
Capitalizing selected area J.E Excel Discussion (Misc queries) 3 March 30th 05 10:10 PM


All times are GMT +1. The time now is 01:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"