ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting rows (left to right) programmatically (https://www.excelbanter.com/excel-programming/375661-re-sorting-rows-left-right-programmatically.html)

Mike[_111_]

Sorting rows (left to right) programmatically
 
In message
at 22:46:36 on Thu, 19 Oct 2006, Mike
S wrote
Worksheets("INPUT").Cells("A1:I2").Sort _
key1:=Worksheets("INPUT").Range("A1"), _
key2:=Worksheets("INPUT").Range("A2"), _
Orientation:=xlSortRows

I don't know if the internal compiler got into a mess, but I've retyped
it as follows and it works

Worksheets("INPUT").Range("A1:P2").Sort _
Key1:=Worksheets("INPUT").Range("A1"), _
Key2:=Worksheets("INPUT").Range("A2"), _
Orientation:=xlSortRows
--
Mike


All times are GMT +1. The time now is 03:04 AM.

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