Sub RevCellsInNewSheet()
Dim i As Long
Dim sngTime As Single
With Worksheets.Add
.Cells(1, 1).Resize(10 ^ 6, 1).Formula = "=""This is a Text""&ROW()"
sngTime = Timer
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
.Cells(i, 2).Value = VBA.StrReverse(.Cells(i, 1).Value)
Next i
sngTime = Timer - sngTime
.Cells(1, 3).Value = sngTime
.Cells(1, 4).Value = "Sekunden"
.Columns("A:D").AutoFit
End With
End Sub
Sub RevArrayInNewSheet()
Dim i As Long
Dim sngTime As Single
Dim vArr As Variant
With Worksheets.Add
.Cells(1, 1).Resize(10 ^ 6, 1).Formula = "=""This is a Text""&ROW()"
sngTime = Timer
vArr = .Cells(1, 1).CurrentRegion.Columns(1).Value
If IsArray(vArr) Then
For i = 1 To UBound(vArr)
vArr(i, 1) = StrReverse(vArr(i, 1))
Next i
.Cells(1, 2).Resize(UBound(vArr), 1).Value = vArr
sngTime = Timer - sngTime
.Cells(1, 3).Value = sngTime
.Cells(1, 4).Value = "Sekunden"
End If
.Columns("A:D").AutoFit
End With
End Sub