Hello,
I am looking for recommendations to speed up a macro. The below macro copies a lot of formulas located in A2:R43, pastes the selection every 47 rows, then pastes the new values of the formulas over the previous paste.
Thank you!
I am looking for recommendations to speed up a macro. The below macro copies a lot of formulas located in A2:R43, pastes the selection every 47 rows, then pastes the new values of the formulas over the previous paste.
Code:
'Copy/Pastes A2:R43 the number of times equaling A1's value
For i = 1 To Worksheets("Calc Sheet").Range("A1").Value
Range("A2:R43").Copy Destination:=Range("A2").Offset(47 * i)
'Copy/Paste below formulas into values over itself
Range("A2:R43").Offset(47 * i).Copy
Range("A2").Offset(47 * i).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.Cut
Range("A2").Offset(47 * i).Select
ActiveSheet.Paste
Next i
Thank you!