LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamically creating Non-Contigous Ranges

I've got a function that identifies certain ranges that have formulas
in them and them fills them down to a certain level. Right now, I'm
getting really poor performance since I'm doing something like this:

For each rng in rngList
rng.FillDown
Next

It seems that if I do each range individually, it takes about 20-30
times longer than if I do all the ranges at once.

In the current example I'm working with, I have 20 different ranges
that need formulas filled down. When I do a multi-select & fill the
entire multi-select, it goes VERY fast.

So, I tried to build a range in the following manner:

For each rng in rngList
If strRngAddresses = "" Then
strRngAddresses = rng.Address
Else
strRngAddresses = strRngAddresses & "," & rng.Address
End If
Next

Range(strRngAddresses).FillDown

This method is very fast & it works as long as their are 14 or fewer
ranges. If there are more than 14 ranges, it fails with an error
"Method 'Range' of object '_Global' Failed.

So, is there a fast way to fill down many ranges that aren't continous?
I tried messing around with Areas, but I don't see a method for adding
an area to an existing range. Maybe I'm making this too complicated

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Shifting Ranges RSquid Charts and Charting in Excel 1 July 31st 08 06:40 PM
Dynamically Changing Named Ranges [email protected] Excel Worksheet Functions 2 December 17th 07 08:04 PM
How to specify cell ranges dynamically? Agent Wild Excel Worksheet Functions 5 June 7th 06 10:37 AM
dynamically building references to named ranges [email protected] Excel Discussion (Misc queries) 1 January 3rd 06 10:23 PM


All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"