|
-
May 19th, 2009, 05:02 PM
#6
Re: INT Function Rounding Problems
Well, all this is really strange and I never noticed that before.
Your Ceil function does not get to the ground of it, as I see it, David. It is logical and works as expected.
Let's see.
Code:
Dim tv As Currency
tv = 2.1
Debug.Print Int(tv * Val("15") + 0.5)
The above code prints 31, which is wrong.
Do I change tv as Double, it prints out 32, which is right.
BUT: Do I change Val("15") against 15 (which is the correct evaluation), the result is 32, too.???
Where is the error?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|