Excel: Can this VBA run faster?


Hi. I have written the following VBA

Sub calculate_macro1()'
' test Macro
'
'
    Sheets("P_L 2,ATM").Select
    Range("G6:G400").Select
    Range("G6:G400").Value = 100
    For i = 6 To 500 Step 2
    Range("X" & i).Copy
    Range("G" & i).PasteSpecial (xlPasteValues)
    Range("G" & i).Copy
    Range("G" & i + 1).PasteSpecial (xlPasteValues)
    Range("X" & i).Activate
    ActiveSheet.Calculate
    Next i
End Sub
How can I change it so that it runs faster? Thanks for any help!


This question generated 16 answers. To proceed to the answers, click here.

This thread is current as of September 24, 2015.


For more resources for Microsoft Excel