Access 2007-2019 Access 2000-2003 Access Seminars TechHelp Support Tips & Tricks Access Forum Course Index Topic Glossary Insider Circle

 Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us More... What's New? Tips & Tricks Access Index Access Tips Excel Index Excel Tips Waiting List

# Round Int Fix

Rounding Numbers with Round, Int, and Fix

Q: I have a situation where I need to round a number UP to the next whole integer, but the ROUND function brings it to the nearest integer. For example, I need 4.2 rounded UP to 5. How can I do this?

A: There are three functions you should be familiar with when it comes to rounding numbers. The first is the ROUND function. This will round off any decimal number to the nearest integer. Anything over .5 will be rounded up. So 4.1 becomes 4, and 4.8 becomes 5.

Next you have the INT function. This rounds any decimal number DOWN to the nearest integer. So 4.1 becomes 4, and 4.8 is also 4.

Finally you have the FIX function which rounds POSITIVE numbers DOWN to the nearest integer, but rounds NEGATIVE numbers UP. So 4.1 becomes 4, and 4.8 becomes 4, but -4.1 becomes -5. The difference between INT and FIX is simply how they handle negatives.

You can generate these values in a query simply by creating calculated fields:

So to answer your question, if you always want to round a value UP to the next integer, I would use INT(x)+1. This will use the INT function to bring your value DOWN to the nearest integer. Then just add 1 to it.

By Richard Rost

 You may want to read these articles from the 599CD News:
 3/26/2020 Sorted Combo Box Values 3/23/2020 Browsing and Selecting Files 3/14/2020 New Access Group 3/6/2020 NEW Access 2019 for Beginners 8/15/2019 Last Chance for Access CDs 8/1/2019 Customer List Form Template 8/1/2019 New Template Access Customer Database 7/30/2019 Microsoft Access Developer 13 6/20/2019 TIP: Validation Rules in Access 11/20/2018 Microsoft Access Developer 12

Learn

 Access index Excel index Word index Windows index PowerPoint index Photoshop index Visual Basic index ASP index Seminars More...
Customers

Online Theater
Insider Circle
Student Databases
Change Email
Info

Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Help

Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services

Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order

Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact

Live Chat
General Info
Support Policy
Contact Form
Email Us