Пожалуйста, проверьте также следующий код. Работает быстро (в памяти, используя массивы) для большого диапазона:
Sub testMoveData()
Dim shA As Worksheet, newSh As Worksheet, arrA As Variant, ArrFin As Variant
Dim i As Long, newName As String
Set shA = ActiveSheet
arrA = shA.Range("A1:E" & shA.Range("A" & Cells.Rows.count).End(xlUp).row).Value
ReDim ArrFin(1 To UBound(arrA, 1), 1 To 5)
For i = 1 To UBound(arrA, 1)
If i = 1 Then
ArrFin(i, 1) = arrA(i, 1): ArrFin(i, 2) = arrA(i, 2): ArrFin(i, 3) = arrA(i, 3)
ArrFin(i, 4) = arrA(i, 4): ArrFin(i, 5) = arrA(i, 5)
Else
ArrFin(i, 1) = arrA(i, 1): ArrFin(i, 2) = arrA(i, 2): ArrFin(i, 3) = arrA(i, 3)
ArrFin(i, 5) = arrA(i, 4)
End If
Next i
newName = InputBox("Enter the date for the new worksheet", "New sheet name setting")
If newName = "" Then MsgBox "No sheet name allocated": Exit Sub
Set newSh = ActiveWorkbook.Sheets.Add(Before:=ActiveWorkbook.Worksheets(1)
newSh.Name = newName
With newSh.Range("A1").Resize(UBound(ArrFin, 1), UBound(ArrFin, 2))
.Value = ArrFin
'A little formatting on the new sheet:
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideHorizontal).Weight = xlThin
.BorderAround Weight:=xlThick
End With
With newSh.Range(newSh.Cells(1, 1), newSh.Cells(1, UBound(ArrFin, 2)))
.Font.Bold = True
.EntireColumn.AutoFit
End With
End Sub