Rounding up .5 in a calculation

Z

zombeese

I am running a query which is used to audit billing amounts. The billing
program rounds numbers up when the is .xx5. In other words, 163.50 * .71 =
116.085. The billing program rounds this to 116.09.

On the other hand, Access (see below) rounds to 116.08.


Round([Code 208 Start]!BILLED*[Code 208 Start]!Pct,2)

What do I use to make .xx5 decimals round up instead of down.
 
M

MGFoster

zombeese said:
I am running a query which is used to audit billing amounts. The billing
program rounds numbers up when the is .xx5. In other words, 163.50 * .71 =
116.085. The billing program rounds this to 116.09.

On the other hand, Access (see below) rounds to 116.08.


Round([Code 208 Start]!BILLED*[Code 208 Start]!Pct,2)

What do I use to make .xx5 decimals round up instead of down.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the Format() function and the CDbl() function to get the Format()
string back to a number:

CDbl(Format(163.50 * .71, "#.##")) yields -> 116.09

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSmc00IechKqOuFEgEQJiwwCfaj8lifnuI/cKLDHrAJd2ZcUqtwAAn3/u
JWPCzRpdel0Zn81pISRy7x85
=jNpz
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top