ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort current range by column j (https://www.excelbanter.com/excel-programming/443795-sort-current-range-column-j.html)

J.W. Aldridge

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

Master Blaster

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


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com