1. Registered User
Join Date
Jun 2002
Posts
72

Is there a function in Access 2000 to round down a number, for example: 2.345 gets rounded down to 2.

2. Registered User
Join Date
Feb 2002
Posts
403
Round is the function you want.

=Round(2.345,0) gives 2

3. Registered User
Join Date
Jun 2002
Posts
72
How do you round say 2.988 down to 2.

4. Registered User
Join Date
Jun 2002
Location
Mpls/St.Paul area
Posts
304
This is one way to do it. Place this function in a module.
Call it and pass the number to truncate.

Function gTrunk(OriginalNumber As Single ) As Integer

gTrunk = OriginalNumber

End Function

___________________________________________

intTruncatedValue = gTrunk(12343.483)

5. Registered User
Join Date
Apr 2002
Location
Germany
Posts
228
converting to integer will result in rounding (>.5 is rounded up, otherwise rounded down). Use the fix function to always round down. It does not have the side effect of data type conversion as well.

usage:

fix(9.876)

will result in 9

6. Registered User
Join Date
May 2002
Location
General Deheza, Cba, Arg.
Posts
276

## Re: rounding number down

use the function int(xvar).
this function return the integer of the xvar.

7. Registered User
Join Date
Apr 2002
Location
Germany
Posts
228
the int function has problems with negative values
the Fix(n) function is defined as Sgn(n) * Int(Abs(n))

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•