ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting columns with macros (https://www.excelbanter.com/excel-programming/274556-sorting-columns-macros.html)

John Waupotic

Sorting columns with macros
 
I'm using the code below to sort the Sheet1 cells in range
of A10 to C30. I'll always want the range to start at
A10, but right and bottom boundaries of the range may
change. Is there a way where you can specify the range
from A10 to "the end" of the worksheet?

Worksheets("Sheet1").Range("A10:C30").Sort _
Key1:=Worksheets("Sheet1").Range("A10")

Thanks,
John


All times are GMT +1. The time now is 05:39 PM.

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