Computer Learning Zone CLZ Access Excel Word Windows

Learning is not attained by chance, it must be sought for with ardor and diligence.

-Abigail Adams
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Tip: Rounding Numbers    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Rounding up to the next integer.
Richard Rost 

17 years ago
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.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Tip: Rounding Numbers.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/2/2026 8:39:47 AM. PLT: 1s