Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting columns with macros
John,
Coupla' ways (there's more too). Instead of Range("A10:C30"), try: Range(Range("A10"), Range("A65536").End(xlUp)).Resize(,3) if there's an entry in column A for each row that you want included in the sort or...... Range("A10").CurrentRegion might work depending on how your data is set up. You could test the above with a "select" statement to see what range is actually going to be sorted. John John Waupotic wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
freezing columns labels while sorting columns | New Users to Excel | |||
Macros for sorting data | Excel Worksheet Functions | |||
help with sorting text in columns to match other columns | Excel Discussion (Misc queries) | |||
sorting with macros | Excel Discussion (Misc queries) | |||
help with dataform and sorting macros | Excel Programming |