RE: Round to Nearest Integer in Access

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Use the Integer function -
Syntax: INT(number) Rounds a number down to the nearest integer.

Number is the real number you want to round down to an integer.

Example
Data = 19.5
Formula Description (Result)
=INT(8.9) Rounds 8.9 down (8)
=INT(-8.9) Rounds -8.9 down (-9)
=A2-INT(A2) Returns the decimal part of a positive real number in cell A2
(0.5)


"Renee" wrote:

> I need to round numbers in Access to the nearest integer, where I'd round up
> if .5 or greater else round down. For example, need to round 33.5 to 34 and
> 33.2 to 33. I do not want to simply change the properties of the field...I
> want the actual rounded number to populate the cell. Thanks!
>
.



Relevant Pages

  • Re: Math.Floor
    ... An Application of method.floor is rounding a value to the nearest integer. ... double value and uses the preceding statement to round each of the numbers to the nearest integer. ... You can get the numbers out of the tokens using Double.valueOf. ... public static void main{ ...
    (comp.lang.java.programmer)
  • Re: Math.Floor
    ... public double round ... This says you can round a floating-point number to the nearest integer by ... You can get the numbers out of the tokens using ... private void showRound{ ...
    (comp.lang.java.programmer)
  • Re: Running Watch
    ... Tom B. wrote: ... But they don't generally round to the ... nearest integer minute, they truncate to the next lower minute (i.e. ...
    (rec.running)
  • Re: rounding to nearest 100
    ... would like it to round down to 4" ... That is NOT rounding to nearest hundred but to nearest integer ... looking for a formula that would work for both in one cell ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Having some trouble
    ... The problem is not the rounding to the nearest integer value, ... outputmaxpower = Int/ Math.Log) ... ReDim Inputnum(1 To inputlength) As Integer ... If you want to round to the nearest integer value, ...
    (comp.databases.ms-access)