Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Operator precedence (order of operate) =A1/A2*A3^5-(A1+A2)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Masood Shahab - 07 Sep 2005 00:35 GMT

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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.