Private Sub STDEVFUNCTION()
Dim iLastColumn As Long
Dim iLastRow As Long
Dim iLastRow2 As Long
Dim sFormula As String
Dim i As Long
Dim sResults As String
With Worksheets("TP_REPEAT")
iLastRow2 = .Range("A" & Rows.Count).End(xlUp).Row - 1
sResults = .Range("B3:B" & iLastRow2).Address(, False)
iLastRow = .Range("A1").CurrentRegion.Rows.Count + 1
iLastColumn = .Range("A1").CurrentRegion.Columns.Count
.Cells(iLastRow, 2) = "=STDEV(" & sResults & ")"
.Cells(iLastRow, 2).AutoFill .Cells(iLastRow, 2).Resize(, 3)
With .Range("B" & iLastRow)
.Copy .Range("B" & iLastRow).Resize(1, iLastColumn - 1)
.Resize(1, iLastColumn - 1).Value = _
.Resize(1, iLastColumn - 1).Value
End With
End With
End Sub