Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way I can sort entire rows in a collection. I have a rather large
program that will change the order of many rows based on options the user uses. I've everything working properly up until it actually needs to move the cells around. I tried creating a collection of ranges but it appears that a range only points to a location on the spreadsheet. So if I use the collection of ranges when it rewrites one row the range that gets information from that row will have the new information. I am not sure if any of this makes sense. If anyone has any ideas about what I can do please let me know. The only thing I can really think of is writing the data to a new spreadsheet or to a net set of rows but I fear that will take far too many resources. Thank you for your time. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
' Establish the collection
set rng = Range("A1").CurrentRegion ' sort the collection rng.Sort Key1:=Range("A1"), Order1:=xlAscending -- Regards, Tom Ogilvy "Abode" wrote: Is there a way I can sort entire rows in a collection. I have a rather large program that will change the order of many rows based on options the user uses. I've everything working properly up until it actually needs to move the cells around. I tried creating a collection of ranges but it appears that a range only points to a location on the spreadsheet. So if I use the collection of ranges when it rewrites one row the range that gets information from that row will have the new information. I am not sure if any of this makes sense. If anyone has any ideas about what I can do please let me know. The only thing I can really think of is writing the data to a new spreadsheet or to a net set of rows but I fear that will take far too many resources. Thank you for your time. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how copy formula that contains ranges so ranges do not overlap | Excel Worksheet Functions | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming | |||
Retrieving the Collection of Ranges in a Workbook | Excel Programming | |||
Deleting named ranges by looping through range collection | Excel Programming | |||
named ranges - changing ranges with month selected | Excel Programming |