VB Round( ) function
James wrote:
The problem is not with VBA, you need to read the number
in as a decimal number not an integer:
Function RoundFunc(Mark As Double) As Integer
RoundFunc = Round(Mark, 0)
End Function
Sorry, a typo. I tried numerous different versions of the function, and
posted the
wrong one! The problem still exists with the above
A cell containing
=RoundFunc(50.5)
still returns 50
|