Functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 
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
 

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

Back
Top