I've created this code which is copying all values from 'Sheet1' - starting in A2 cell to the first empty row of column 1 in Sheet2.
In case that more cells are needed to be copied, it is running quite long. Is there a possibility to make it run faster?
Thanks
Sub CopyCells()
Dim CopyRow As Long
CopyRow = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row 'find last first empty cell in destination sheet
'Sheets("Sheet1").Range("A2").Copy Destination:=Sheets("Sheet2").Range("A" & CopyRow + 1)
Call turn_on_off(False)
For I = 2 To Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Sheet1").Range("A" & I).Copy Destination:=Sheets("Sheet2").Range("A" & CopyRow + I - 1)
Next I
Call turn_on_off(True)
End Sub
Public Sub turn_on_off(mode As Boolean)
With Application
.Calculation = IIf(mode = True, xlCalculationAutomatic, xlCalculationManual)
.ScreenUpdating = mode
End With
End Sub