When I calculate the sales tax on a form I want it to round off to 2 decimals in its calculation. Right now I end up with a long decimal for calculation purposes and this will leave the calculation over or under by one cent on occassion.
CK8--yes put it in the control source of your text box
=(int(([value]+.005)*100))/100
craig your formula doesnt' seem to work for me. It's missing a right paren ) some place:
when I put it at the end all i am getting is an integer, not a number with 2 decimal places.
when I put it after the first [NumberOfDP] it is .01 too high for original values which have the hundreths digit <5 (i.e. 16.5221 = 16.53 instead of 16.52)
I think you need to add .005, not .5 really in your forumula it would be:
Code:
.5/(10*[NumberOfDP])
so i think your forumula, which is essentially the same as mine except that I sort of hard-code in the 2 decimal places, should be:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.