okay, sorry about all that, i just tested it, and came across a few bugs..... first of all, the Round() function will round up for an even .5 for odd numbers and down for even numbers. i don't understand the logic of that, but that's how it works... so i added the following compares to allow for that:
value = yournumber
If Int(value) Mod 2 <> 0 Then
roundValue = value + .49
Else
roundValue = value + .5
End If
If value <> Int(roundValue) Then
myvar = Round(roundValue, 0)
Else
myvar = value
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.