Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 

Round Int Fix

Rounding Numbers with Round, Int, and Fix

UPDATE: see my NEW video: Rounding

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.

Round Int Fix in Access

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

Round Int Fix in Microsoft Access Query

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   Richard Rost on LinkedIn Email Richard Rost
Click here to sign up for more FREE tips

 

 

 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 6:31:59 AM. PLT: 0s