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

Hello,
with the help of this group I have created this Macro which I run from
a button, but I need to pre select the range.

Sub Sort_Fastest_Male_then_Female()
'
' Sort_Fastest_Male_then_Female Macro
' Macro recorded 6/06/2009 by Stephen Ditchfield
'

'
Selection.Sort Key1:=Range("M7"), Order1:=xlDescending, Key2:=Range
("I7") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1,
MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
End Sub

is there a way to modify it so I don't need to select the range then
run the Macro.
Can I just run the Macro and it finds the last used cell in I7 and
sorts leaving the Header rows (1 to 6) in place?
thanks again for all the help
regards
Ditchy
Ballarat, Australia
 
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
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Search & Refine Raw Data bbibib Excel Discussion (Misc queries) 8 January 6th 07 06:12 PM


All times are GMT +1. The time now is 10:45 PM.

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

About Us

"It's about Microsoft Excel"