don't know how to round up the results

  • Thread starter Thread starter miss granny
  • Start date Start date
M

miss granny

how do i round the results of a calulation in a query.

ex: results below may not be correct.

$42,500 x 3.1% = 131750

if the result is 131750.
i need to round the pay raise $132.00, i think.
the above is a salary increase of 3.1 %.
i have no idea, how to do the calulation, to round
the results.
i can set up the add $42,500.00 + $132.00 = $42,632.00,
that's not my problem.
Help, and Thanks
 
Hi,


A 3.1% increase will do 1 317.50 $, not 131.75$


Assuming you wish to round 1317.50 to 1318.00:


Int( 0.5+ AmountToRoundUpOrDown / CDec(100.0) )


should do.


You can place that expression as a computed column in a query.



Hoping it may help,
Vanderghast, Access MVP
 
Michel

I am fairly sure you meant:

Int( 0.5+ AmountToRoundUpOrDown / CDec(100.0) ) * 100

???
 
Back
Top