Hi,
I've been scathing my head because a function that returns a Double has been giving me a strange result.
I have realised it's VBA and not my function which is at fault.
Can someone tell me why when you type...
?CDbl(110.4) - CDbl(110)
into the intermediate window the result is 0.400000000000006
I have now converted the function's return value using CDec() which returns 0.4 as I would expect.
Is there another way?
I've been scathing my head because a function that returns a Double has been giving me a strange result.
I have realised it's VBA and not my function which is at fault.
Can someone tell me why when you type...
?CDbl(110.4) - CDbl(110)
into the intermediate window the result is 0.400000000000006
I have now converted the function's return value using CDec() which returns 0.4 as I would expect.
Is there another way?