I am trying to improve the efficiency of my following code which is a pretty easy copy paste task
For i = 2 To 60
some_data = xxx
some_data_2 = xxx
Sheets("template1").Select
Sheets("template1").Copy Before:=Sheets(20)
Sheets("example").Select
Range(Cells(some_data + 1, i), Cells(some_data + some_data_2, i)).Select
Selection.Copy
Sheets("template1 (2)").Select
Range("C5").Select
ActiveSheet.Paste
I am only looping this for 60 sheets, then it took several minutes and Excel exited automatically(crahsed?). How can I improve its efficiency?
EIDT: Will it help if I try to rewrite the whole thing using python via for instance openpyxl?