Greg, GOOD CATCH. I didn't think of that. You're right. INT(4)+1 will result in a 4 if the number is 4.0. So we're going to have to check and see if the number has any kind of a fractional component first. I'll add another field:
X: IIf(N<>I,I+1,N)
N is the original number I is the INT(N)
Now, IF N is not I (in other words, N has a fractional component so it's different from I) then set X equal to I+1 (round it up) otherwise, it's just N (the original number).
Again, real good catch. I only tested my results with fractional numbers, not whole numbers.
Now about the problem you're having, you could just say:
B: N/50
This will yield 4.02 if N is 201, or 3.98 if N is 199. Now say:
Boxes: IIf(Int(B)=B,B,Int(B)+1)
Basically if the INT(B) is the same as N/50, then there is no fractional component (200, 150, etc.) so just use B. If there is a fraction, add 1 for one more box.
Same concept... and again, GREAT catch.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.