G
Guest
I am trying to write a round-up function that ALWAYS rounds up. For example,
I want it to round 5.2 to 6. What am I missing:
Function Round_Up(dNum As Double, nDP As Integer) As Double
dNum = Int(dNum * 10 ^ nDP + 0.5) / 10 ^ nDP
Round_Up = dNum
End Function
Expr1: Round_Up([DimmWt],0)
'where DimmWt = 5.2, it returns a value of 5, not desired 6
Thanks.
Sammie
I want it to round 5.2 to 6. What am I missing:
Function Round_Up(dNum As Double, nDP As Integer) As Double
dNum = Int(dNum * 10 ^ nDP + 0.5) / 10 ^ nDP
Round_Up = dNum
End Function
Expr1: Round_Up([DimmWt],0)
'where DimmWt = 5.2, it returns a value of 5, not desired 6
Thanks.
Sammie