Does VBA round .5 up or down?

G

Guest

Rounding in VBA doesn't seem to be consistent. Running the following code
shows that 3.825 rounds down to 3.82, and 3.875 rounds up to 3.88.

MsgBox ("3.825 rounded = " & Round(3.825, 2) & "; 3.875 rounded = " &
Round(3.875, 2))

Is there an explanation for this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top