ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Order of calculation (https://www.excelbanter.com/excel-discussion-misc-queries/91598-order-calculation.html)

Louise

Order of calculation
 
Does anybody know of a good website which has examples of the way in which
Excel performs calculations when there is more than one operator in the
calculation? I understand the brackets go around the 'easy' bit, in order to
tell Excel to do that bit first, but if the calculation has more than 2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise

Bob Phillips

Order of calculation
 
BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way in which
Excel performs calculations when there is more than one operator in the
calculation? I understand the brackets go around the 'easy' bit, in order

to
tell Excel to do that bit first, but if the calculation has more than 2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise




Bob Phillips

Order of calculation
 
Sorry, I meant Order not Of

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way in which
Excel performs calculations when there is more than one operator in the
calculation? I understand the brackets go around the 'easy' bit, in order

to
tell Excel to do that bit first, but if the calculation has more than 2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise




Louise

Order of calculation
 
hello, thank you for your reply.
Unfortunately, this doesn't really help me. I am already aware of the
actual order, what I am unsure of is where the different sets of brackets go
when the calculation contains more than two operators.

Louise

"Bob Phillips" wrote:

BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way in which
Excel performs calculations when there is more than one operator in the
calculation? I understand the brackets go around the 'easy' bit, in order

to
tell Excel to do that bit first, but if the calculation has more than 2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise





Bob Phillips

Order of calculation
 
That depends upon what order you want them to be processed.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
hello, thank you for your reply.
Unfortunately, this doesn't really help me. I am already aware of the
actual order, what I am unsure of is where the different sets of brackets

go
when the calculation contains more than two operators.

Louise

"Bob Phillips" wrote:

BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way in

which
Excel performs calculations when there is more than one operator in

the
calculation? I understand the brackets go around the 'easy' bit, in

order
to
tell Excel to do that bit first, but if the calculation has more than

2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise







Louise

Order of calculation
 
A basic example........

My calculation is =10+10*2+2*10

My total should therefore be 420.

Where do the brackets go, and why, in order to get to the right answer???

Louise



"Bob Phillips" wrote:

That depends upon what order you want them to be processed.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
hello, thank you for your reply.
Unfortunately, this doesn't really help me. I am already aware of the
actual order, what I am unsure of is where the different sets of brackets

go
when the calculation contains more than two operators.

Louise

"Bob Phillips" wrote:

BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way in

which
Excel performs calculations when there is more than one operator in

the
calculation? I understand the brackets go around the 'easy' bit, in

order
to
tell Excel to do that bit first, but if the calculation has more than

2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise







Roelof van Wyk

Order of calculation
 
=((10+10)*2+2)*10

Normal arithmatic applies x / + -

David Biddulph

Order of calculation
 
"Louise" wrote in message
...
"Bob Phillips" wrote:


"Louise" wrote in message
...


"Bob Phillips" wrote:


(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way
in

which
Excel performs calculations when there is more than one operator in

the
calculation? I understand the brackets go around the 'easy' bit,
in

order
to
tell Excel to do that bit first, but if the calculation has more
than

2
operators, I don't know where the other sets of brackets go.


BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract


hello, thank you for your reply.
Unfortunately, this doesn't really help me. I am already aware of the
actual order, what I am unsure of is where the different sets of
brackets

go
when the calculation contains more than two operators.


That depends upon what order you want them to be processed.


A basic example........

My calculation is =10+10*2+2*10

My total should therefore be 420.

Where do the brackets go, and why, in order to get to the right answer???


It looks as if you want
=((10+10)*2+2)*10

It sounds as if, to get what *you* have defined as the right answer, you
want each operation in the order in which they are listed, rather than in
the order of precedence which Bob gave you.
To be on the safe side, you could, if you wish, put brackets round each
operation in turn:
=(((10+10)*2)+2)*10

.... but you can omit the brackets where the conventional order of precedence
doesn't need the brackets (such as where the multiply takes precedence over
the subsequent addition).

If your calculation is really
=10+10*2+2*10
the *right* answer is 50.
--
David Biddulph



Bob Phillips

Order of calculation
 
If you know how to do it on paper, do the same in Excel

=((10+10)*2+2)*10

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
A basic example........

My calculation is =10+10*2+2*10

My total should therefore be 420.

Where do the brackets go, and why, in order to get to the right answer???

Louise



"Bob Phillips" wrote:

That depends upon what order you want them to be processed.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
hello, thank you for your reply.
Unfortunately, this doesn't really help me. I am already aware of the
actual order, what I am unsure of is where the different sets of

brackets
go
when the calculation contains more than two operators.

Louise

"Bob Phillips" wrote:

BODMAS

Brackets
Of
Divide
Multiply
Add
Subtract

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Louise" wrote in message
...
Does anybody know of a good website which has examples of the way

in
which
Excel performs calculations when there is more than one operator

in
the
calculation? I understand the brackets go around the 'easy' bit,

in
order
to
tell Excel to do that bit first, but if the calculation has more

than
2
operators, I don't know where the other sets of brackets go.

Any help would be appreciated.
Thank you.

Louise









Louise

Order of calculation
 
so, the brackets around 10+10 tells Excel to do that bit first, before it
continues with the rest of the calculation.
What do the brackets around 10+10*2+2 tell Excel to do?
Is it always the very last part of the calculation that doesn't have
brackets around it?

As you can probably tell, maths was never my strongest point and I don't
understand what the second set of bracets are instructing Excel to do.

Thanks again.
Louise

"Roelof van Wyk" wrote:

=((10+10)*2+2)*10

Normal arithmatic applies x / + -


[email protected]

Order of calculation
 
Louise wrote:
so, the brackets around 10+10 tells Excel to do that bit first,
before it continues with the rest of the calculation.
What do the brackets around 10+10*2+2 tell Excel to do?
Is it always the very last part of the calculation that doesn't
have brackets around it?


No. I suggest that you use Excel Help. Enter "operator precedence"
and select the link "The order in which Excel performs operation".
Hopefully that clarifies things for you.

As you can probably tell, maths was never my strongest point
and I don't understand what the second set of bracets are
instructing Excel to do.
[....]
"Roelof van Wyk" wrote:
=((10+10)*2+2)*10


Notice that that could be written 10*((10+10)*2+2), demonstrating
that it is not always "the very last part of the calculation that
doesn't have brackets [sic] around it".

As you read left to right, when you see a right parenthesis,
evaluate everything left-to-right until you encounter the matching
left parenthesis. So, first we do "10+10" (20), then we evalutate
"20*2 + 2" (42), and finally we do "42*10" (420). The key is: we
do "20*2" before we do "...+2". If we wanted to do "2+2" before
we do "20*...", we would have to write (10+10)*(2+2)*10, which
yields 20*4*10 = 800.


Dominic LeVasseur

Order of calculation
 
Louise,

Perhaps you could think of the parentheses as a way to tell Excel to do THIS
"first", or "independently".

So your formula:

=10+10*2+2*10

Without parentheses, the normal order of operation, Left to Right, would
apply.

X / + -

So 10*2 would happen first, then 2*10. Then 10 + 20 (the result of 10*2).
Then 30 (the result of the former) plus 20 (the result of 2*10).

In other words, all Multiplication first, then all the addition.

With parentheses:

=((10+10)*2+2)*10

Remember the parentheses say do this "first", or "independently".

The 10+10 is inside its own set of parentheses, so that tells Excel to do
this independently, which comes up with 20. Then we have a *2+2. Remember
left to right, * comes before +, so then we do a *2. This gives us 40. Then
we add two (because the +2 comes inside the larger set of parentheses, we do
this before the *10). This gives us 42. Then we do the *10.

Does that help at all?



"Louise" wrote:

so, the brackets around 10+10 tells Excel to do that bit first, before it
continues with the rest of the calculation.
What do the brackets around 10+10*2+2 tell Excel to do?
Is it always the very last part of the calculation that doesn't have
brackets around it?

As you can probably tell, maths was never my strongest point and I don't
understand what the second set of bracets are instructing Excel to do.

Thanks again.
Louise

"Roelof van Wyk" wrote:

=((10+10)*2+2)*10

Normal arithmatic applies x / + -


Louise

Order of calculation
 
Hello.

Thank you very much for explaining this to me, yes this makes it clearer.

Thanks again.
Louise

"Dominic LeVasseur" wrote:

Louise,

Perhaps you could think of the parentheses as a way to tell Excel to do THIS
"first", or "independently".

So your formula:

=10+10*2+2*10

Without parentheses, the normal order of operation, Left to Right, would
apply.

X / + -

So 10*2 would happen first, then 2*10. Then 10 + 20 (the result of 10*2).
Then 30 (the result of the former) plus 20 (the result of 2*10).

In other words, all Multiplication first, then all the addition.

With parentheses:

=((10+10)*2+2)*10

Remember the parentheses say do this "first", or "independently".

The 10+10 is inside its own set of parentheses, so that tells Excel to do
this independently, which comes up with 20. Then we have a *2+2. Remember
left to right, * comes before +, so then we do a *2. This gives us 40. Then
we add two (because the +2 comes inside the larger set of parentheses, we do
this before the *10). This gives us 42. Then we do the *10.

Does that help at all?



"Louise" wrote:

so, the brackets around 10+10 tells Excel to do that bit first, before it
continues with the rest of the calculation.
What do the brackets around 10+10*2+2 tell Excel to do?
Is it always the very last part of the calculation that doesn't have
brackets around it?

As you can probably tell, maths was never my strongest point and I don't
understand what the second set of bracets are instructing Excel to do.

Thanks again.
Louise

"Roelof van Wyk" wrote:

=((10+10)*2+2)*10

Normal arithmatic applies x / + -



All times are GMT +1. The time now is 01:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com