How to use VBA to loop copy and paste [Closed]

Report
Posts
2
Registration date
Tuesday October 24, 2017
Status
Member
Last seen
October 26, 2017
-
 Blocked Profile -
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

1 reply


Does the function INDIRECT help you? I am asking if you looked at that yet, and does it fit the application?
Posts
2
Registration date
Tuesday October 24, 2017
Status
Member
Last seen
October 26, 2017

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
Blocked Profile
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?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!