Hi,
what is the order of operating and calculating in this formula?
=A1/A2*A3^5-(A1+A2)
1- A1+A2
2- A1/A2
3- A3^5
4- A2*A3
Regards.
Barb Reinhardt - 07 Sep 2005 01:06 GMT
If it were me, I'd put parens in to ensure I get the calculation I want.
> Hi,
> what is the order of operating and calculating in this formula?
[quoted text clipped - 9 lines]
>
> Regards.
Harlan Grove - 07 Sep 2005 01:21 GMT
Masood Shahab wrote...
>what is the order of operating and calculating in this formula?
>=A1/A2*A3^5-(A1+A2)
Same as
=((A1/A2)*(A3^5))-(A1+A2)
There are 3 different precedence levels in your formula
^
* and /
+ and -
in declining order of precedence. For operators of equal precedence,
Excel evaluates STRICTLY left to right.
Masood Shahab - 07 Sep 2005 01:27 GMT
Dear Harlan Grove
I think parenthesis first calculate.
with your idea
=A1/A2*A3^5-(A1+A2) Same as =((A1/A2)*(A3^5))-(A1+A2)
therefore, A1/A2 (option 2 of the test) is true
is it true?
which option is true?
1- A1+A2
2- A1/A2
3- A3^5
4- A2*A3
Thanks
> Masood Shahab wrote...
> >what is the order of operating and calculating in this formula?
[quoted text clipped - 12 lines]
> in declining order of precedence. For operators of equal precedence,
> Excel evaluates STRICTLY left to right.
Harlan Grove - 07 Sep 2005 05:35 GMT
"Masood Shahab" wrote...
>I think parenthesis first calculate.
>with your idea
[quoted text clipped - 7 lines]
>3- A3^5
>4- A2*A3
At this point I don't believe I understand what you mean by 'which option is
true?' None are true. All evaluate to numbers. The only question is what the
order of evaluation would be. Strictly speaking, it doesn't matter for
operations of different precedence. A3^5 will be evaluated separately from
A1/A2 and A1+A2. It doesn't matter which of these simple arithmetic
expressions is evaluated first. All that matters is how they're grouped.
Masood Shahab - 07 Sep 2005 03:40 GMT
In the following formula, which is first calculated?
=A1/A2*A3^5-(A1+A2)
1- A1+A2
2- A1/A2
3- A3^5
4- A2*A3
JE McGimpsey - 07 Sep 2005 13:55 GMT
Strictly in terms of operator precedence:
1) B = A1 + A2
2) C = A3^5
3) D = A1/A2
4) E = D * C
5 ) F = E - B
Whether within the calculation engine (1) happens before (2), I don't
know. It doesn't matter as long as (1) happens before (5). LIkewise, (2)
may happen before (3) or (3) before (2), but both happen before (4).
> In the following formula, which is first calculated?
>
[quoted text clipped - 4 lines]
> 3- A3^5
> 4- A2*A3
Tushar Mehta - 08 Sep 2005 14:33 GMT
If you check XL help for 'operator precedence' (w/o the quote), the
firt suggested topic will be 'About calculation operators.' It
includes a section on 'The order in which Excel performs operations in
formulas'
To see what XL actually does, enter the formula in a cell, display the
Formula Auditing toolbar, click the 'Evaluate Formula' button.

Signature
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
>
> Hi,
[quoted text clipped - 10 lines]
>
> Regards.