calculation help

johnob

Registered User.
Local time
Today, 08:34
Joined
Jan 12, 2014
Messages
45
Code:
=IIf
([Result1]>[Reports]![Pump Settings]![Target High],
[Result1]-[Reports]![Pump Settings]![Target]/[Reports]![Pump Settings]![Sensitivity Factor (SF)]
,0)
I need a little help with this formula, If you use a calculator it works out the correct answer, eg.
result 1 = 12.4
target high = 6
(SF) = 1.5 ............Sum Would Be .......... 12.4 - 6 / 1.5 .................Correct answer = 4.3

But on access the answer i get is 8.4 ?

Can anyone help ?

Thanks
 
Last edited:
It would help if you would provide some raw, pre-calculation numbers, but my guess offhand, based on the fact that you're getting different results with a calculator than are being generated by Access, is that you're forgetting order of operations:

In mathematics, including calculations done by Access, operations are performed in the following order:

  1. Parentheses
  2. Exponents (Powers and Roots)
  3. Multiplication/Division
  4. Addition/Subtraction

Each step is performed left to right; ie - all expressions in parentheses are worked first, starting with the innermost, but handling each 'tier' left to right. All exponents are determined, then all multiplication/division is worked out, and only then are addition and subtraction performed.

That means that for 10-6/3, the correct answer is 8, not 1.33333.
 
thank you

sorted
 

Users who are viewing this thread

Back
Top Bottom