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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,934
Members
449,094
Latest member
teemeren

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
Back
Top