I am finding that the VBA Round function returns the wrong result. I found a working alternative which is to use the Application.Round
instead.
Why doesn't the VBA Round
function work as expected?
Sub roundingResults()
Range("A1") = 123456.705
Debug.Print "Approach #1 " & Round(Range("A1").Value, 2)
Debug.Print "Approach #2 " & Application.Round(Range("A1").Value, 2)
End Sub
Output
Approach #1 123456.7
Approach #2 123456.71