There is no need to use loop:
Sub CopyCells()
Dim CopyRow As Long
Dim lastrow As Long
Dim sh1 As Worksheet, sh2 As Worksheet
Call turn_on_off(False)
Set sh1 = ThisWorkbook.Worksheets("Sheet1")
Set sh2 = ThisWorkbook.Worksheets("Sheet2")
lastrow = sh1.Cells(Rows.Count, 1).End(xlUp).Row
CopyRow = sh2.Cells(Rows.Count, 1).End(xlUp).Row
sh2.Range("A" & CopyRow + 1).Resize(lastrow - 1).Value = _
sh1.Range("A2:A" & lastrow).Value
Call turn_on_off(True)
End Sub
Range.Value=Range.Value
is much faster then Copy/Paste
, however it copies only values (without formatting). If you need to copy formatting as well, change Range.Value=Range.Value
part to:
sh1.Range("A2:A" & lastrow).Copy Destination:=sh2.Range("A" & CopyRow + 1)