![]() |
Alternitive to Collection of Ranges
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. |
Alternitive to Collection of Ranges
' 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. |
All times are GMT +1. The time now is 12:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com