Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Sort current range by column j

After the following macro, I want to sort the selected range by column
J.

Sub Macro1()

Range("A100000").Select
Selection.End(xlUp).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlUp)).Select

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Sort current range by column j

On Oct 19, 10:09*pm, "J.W. Aldridge"
wrote:
After the following macro, I want to sort the selected range by column


use this:

Selection.Sort Key1:=Range("J3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal


good luck
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
Sort by column, not range Jim Excel Discussion (Misc queries) 1 April 22nd 10 03:21 AM
Unable to sort when column is included in range Trudy Excel Discussion (Misc queries) 1 July 8th 08 03:27 PM
Sort a range of data based on another column RobM Excel Discussion (Misc queries) 1 July 13th 07 05:36 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
excel change default column sort to current selection john palmer Excel Worksheet Functions 2 March 8th 05 03:07 PM


All times are GMT +1. The time now is 06:23 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"