My B9:B40000 in Sheet1 contain the below formula. I have noticed slowness in excel when it starts the calculation. Is there a way to convert them into vba code?
Please help. Thank you.
Please Login or Register to view this content.
My B9:B40000 in Sheet1 contain the below formula. I have noticed slowness in excel when it starts the calculation. Is there a way to convert them into vba code?
Please help. Thank you.
Please Login or Register to view this content.
Hi,
This really shouldn't cause a noticable slow down of your sheet.
Do you have many volatile functions or array functions in your sheet as well?
Also, you could make the formula slightly less complex like this:
Please Login or Register to view this content.
Rule 1: Never merge cells
Rule 2: See rule 1
"Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".
post your workbook...
you could probably drop the a9="" as well as that would give n/a if blank anyway
=IF(ISERROR(MATCH(A9,Sheet2!$A$2:Sheet2!$A$40000,0)),"",INDEX(Sheet2!$B$2:Sheet2!$B$40000,MATCH(A9,Sheet2!$A$2:Sheet2!$A$40000,0)))
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
hi,
Yes, they can be converted to VBA, but I've got a couple of suggestions first...
To halve the number of calculations, change your formulae to:
cell B9cell C9Please Login or Register to view this content.
Or (if I have understood correctly?) you could usePlease Login or Register to view this content.
cell B9 =Do your formulae really need to go down to row 40,000?Please Login or Register to view this content.
- The fewer rows you need to use the easier on Excel. You could use a "dynamic named range" (run a search for this) to cover the data range shrinking or expanding.
hth
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
Thanks for your time and suggestions. I did try them but it still slowing the excel performance. Although I am on cell 13,000 yet.
Yes, the formula would even go down to 60,000.
Note: there are also cells that contain small formulas that I think I would not be necessary to mention here as my main concern is this big formula.
Please help. Thank you.
hi,
What version of Excel are you using?
How many other files do you have open?
Are you filtering the sheet too?
Is it only slow to calculate initially, or repeatedly?
(this is likely due to the limits of Excel's calculation dependency tree which will only allow so many formulae before it rebuilds the calculation tree at every calculation.)
You may find some useful info on Dave &/or Charles' sites:
www.mvps.org/dmcritchie/excel/excel.htm
http://decisionmodels.com/calcsecrets.htm
http://decisionmodels.com/optspeedb.htm
I strongly recommending only copying the formula down for as many rows as is currently necessary & if the data will remain static, I recommend copying & paste special'ing as values once the calculation is complete.
Are you aware that any macro approach is likely to be a "one off" ie the same as copying & paste special'ing?
I'm sorry I'm off to bed now & don't have time to write a test macro at the moment. You could record a macro as you complete the steps manually & this will give us a base code to modify for you...
If you still want a macro approach after reading Charles' site, can you please post a sample workbook as Garretonufer requested (& include your recorded code)?
hth
Rob
Last edited by broro183; 09-30-2009 at 06:06 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks