Use of Brackets in Excel Formulas

 

In school days we have heard something called a BODAMS Rule of Calculation. The Same concept is applied in excel as well.

BODAMS Rule:

B       Brackets first

O       Orders (i.e Powers and Square Roots, etc.)

DM     Division and Multiplication (left-to-right)

AS      Addition and Subtraction (left-to-right)

Example: How do you work out 3 + 6 × 2 ?

Multiplication before Addition:

First 6 × 2 = 12, then 3 + 12 = 15

How do you work out (3 + 6) × 2 ?

Brackets first:

First (3 + 6) = 9, then 9 × 2 = 18

How do you work out 12 / 6 × 3 ?

Division and Multiplication rank equally, so just go left to right:

First 12 / 6 = 2, then 2 × 3 = 6

Sometimes you will need to use brackets, (also known as 'braces'), in formula.

This is to ensure that the calculations are performed in the order that you need.

The need for brackets occurs when you mix plus or minus with divide or multiply.

Mathematically speaking the * and / are more important than + and –

The * and / operations will be calculated before + and -

Example 1 : The wrong answer !

image

You may expect that 10 + 20 would equal 30

And then 30 * 2 would equal 60

But because the * is calculated first Excel sees the

calculation as 20 * 2 resulting in 40

And then 10 + 40 resulting in 50

Example 2 : The correct answer.

image

By placing brackets around (10+20) Excel performs this part of the calculation first, resulting in 30

Then the 30 is multiplied by 2 resulting in 60.

No comments:

Post a Comment