How to use VBA to loop copy and paste

Closed
maddalenamori Posts 2 Registration date Tuesday October 24, 2017 Status Member Last seen October 26, 2017 - Updated on Oct 24, 2017 at 07:45 AM
 Blocked Profile - Oct 26, 2017 at 04:47 PM
Hello,

I have a formula in raw # 12 (E12: TNF12) and would like to paste this formula in the raw below (raw# 13) and then copy and paste its content as values. I would like to have this looped till the end of my table. Indeed I would like to have the formula in raw #12 o be copied in raw # 14 and then paste content of raw #14 as values and so on and so forth (till raw 41)

I have this code that is only copies the formulas down but since the number of columns I have is high I need to work one raw at a time


Sub ChartSectionCopy()
Dim i As Long
Application.ScreenUpdating = False
For i = 1 To 29
Range("E12:TNF12").Copy Destination:=Range("E12").Offset(1 * i)

Next i
Application.ScreenUpdating = True
End Sub


Here is a picture of my excel table


Thank you very much fro your help
Related:

1 response

Blocked Profile
Oct 25, 2017 at 05:28 PM
Does the function INDIRECT help you? I am asking if you looked at that yet, and does it fit the application?
0
maddalenamori Posts 2 Registration date Tuesday October 24, 2017 Status Member Last seen October 26, 2017
Oct 26, 2017 at 02:15 AM
Hi, no I do not know how to use it. Maybe you can suggest a way to make the above code faster as at the moment it is very slow
0
Blocked Profile
Oct 26, 2017 at 04:47 PM
If it is slow, then you need to see what the clock speed of the CPU is, how many cores, and threads can it spawn?
0