Help with VBA needed

elmacay

Board Regular
Joined
May 4, 2006
Messages
88
Hi guys,

I need to calculate a rather intricate index formula in 43,000 cells. This our servers can't handle, it takes up too much power. So I would like to loop the following steps in a macro:

1. Copy the formula in cells A1-A10 (10 at a time works well)
2. Paste the formulae in A11-A20
3. Copy A11-A20
4. Paste as value in A11-A20
-------
Loop 2
5. Copy formula A1-A10
6. Paste in A21-A30
7. Copy A21-A30
8. Paste as value in A21-A30
-------
Loop 3
Etc.

Any help is greatly appreciated!

Cheers, Elmacay
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

ChrisBM

Board Regular
Joined
Sep 22, 2014
Messages
215
Code:
'Counter for the loops
For i = 1 to 4300
         'Copy A 1 to A 10
         Range("A1:A10").Copy
         'Paste Formulas in next block
         Range("A" & (((i-1)*10)+11)).PasteSpecial Paste:=xlPasteFormulas
         'Copy Next block
         Range("A" & (((i-1)*10)+11) & ":A" & (((i-1)*10)+20)).Copy
         'Paste as static
         Range("A" & (((i-1)*10)+11)).PasteSpecial Paste:=xlPasteValues
Next

Hope this helps,

Kind Regards,
Chris
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,164
Messages
5,835,753
Members
430,384
Latest member
kiuwai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top