Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Sorting Using Code

I have a data table A5:L3776 - Row 5 is header info
I need to enter code to sort this range
Primary Sort on B Column
Secondary Sort on G Column
The Macro recorder is screwing things up.
Can someone get me through this?
TIA,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sorting Using Code

Range("A5:L3776").Sort Key1:=Range("B5"), _
Order1:=xlAscending, Key2:=Range("G5"), _
Order2:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom



--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:FDrYc.22960$wu.18895@okepread04...
I have a data table A5:L3776 - Row 5 is header info
I need to enter code to sort this range
Primary Sort on B Column
Secondary Sort on G Column
The Macro recorder is screwing things up.
Can someone get me through this?
TIA,




Reply
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
code for sorting Jack Sons Excel Discussion (Misc queries) 4 September 29th 09 08:23 AM
Sorting in code Ayo Excel Discussion (Misc queries) 4 July 19th 08 11:47 PM
Sorting by code Jay Excel Discussion (Misc queries) 1 February 8th 08 05:55 PM
sorting code Larry Excel Discussion (Misc queries) 5 August 2nd 06 07:40 AM
code for sorting wessj Excel Programming 2 August 12th 03 04:20 PM


All times are GMT +1. The time now is 11:08 AM.

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"