A
Andrew
If in a cell on a spreadsheet, I enter the following equation:
=ROUND(50.5, 0)
I obtain the result 51, which I would expect, since 0.5 should be rounded
up.
If I write the following VB funcion:
Function RoundFunc(Mark As Integer) As Integer
RoundFunc = Round(Mark, 0)
End Function
And then enter the following equation into a cell:
=RoundFunc(50.5)
I obtain the result 50. i.e. 0.5 is rounded down
Why the difference? Is there a function that I can use in my VB code that
will round 0.5 up rather than down?
=ROUND(50.5, 0)
I obtain the result 51, which I would expect, since 0.5 should be rounded
up.
If I write the following VB funcion:
Function RoundFunc(Mark As Integer) As Integer
RoundFunc = Round(Mark, 0)
End Function
And then enter the following equation into a cell:
=RoundFunc(50.5)
I obtain the result 50. i.e. 0.5 is rounded down
Why the difference? Is there a function that I can use in my VB code that
will round 0.5 up rather than down?