View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Andrew[_24_] Andrew[_24_] is offline
external usenet poster
 
Posts: 22
Default 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