As mentioned in post #4 trying to round a literal doesn't mean anything
Here's the code which uses the Excel Function method
Sub RoundVal()
'Round numbers using Excel method in a sub
Dim i As Long
For i = 2 To 9
Range("d" & i) = Application.WorksheetFunction.Round(Range("a" & i), 2)
Next i
End Sub
and the code without he Excel function method
Sub VBAroundDemo()
'Round numbers using VBA round method in a sub
Dim i As Long
For i = 2 To 9
Range("c" & i) = Round(Range("a" & i), 2)
Next i
Exit Sub
End Sub
Bookmarks