Functions

D

Don

I am trying to use a function in a form for a calculation of 2 currency
values. I want to round the results. Does anyone know the formula if I want
to do the formula (A/B)*C. And I want the results of A/B to be
rounded to 2 decimal points before I multiply by C. Any help would be
greatly appreciated. Thanks.
 
W

Wayne-I-M

Hi Don

You may get a more acurate result if you do the sum(s) first and then
convert the result to currency - use CCur
 
F

fredg

I am trying to use a function in a form for a calculation of 2 currency
values. I want to round the results. Does anyone know the formula if I want
to do the formula (A/B)*C. And I want the results of A/B to be
rounded to 2 decimal points before I multiply by C. Any help would be
greatly appreciated. Thanks.

Look up the Round function in VBA help.
 
K

Ken Sheridan

Round(A/B,2)*3 will do it, but taking the following example:

Round(1/3,2)*3 returns 0.99

while

(1/3)*3 returns 1

Are you sure you want to introduce the rounding error which the first
exhibits?

Ken Sheridan
Stafford, England
 
Top