Office 2007 - Excel

Lesson 27: Formulas

27/83 Lessons 

What are “Formulas”?

We use a formula when we want to make calculations in Excel.
A formula in Excel always begins with the “equal” sign (=).
For example, if you wish to calculate the sum of 2 and 3, you would normally type 2 +3.
In Excel, you must type = 2 +3.

You can type a formula directly in the formula bar type, or you can type in a cell.
When you start typing with the “equal” sign, Excel knows that you enter a formula, and determines what to calculate.

Calculation operators and their priority

Calculation Operators are plus (+), minus (-), multiply (*), etc., in a standard order.

To resolve all your doubts I put it them in a table:

Operator Function
1. % Percentage calculation
2. ^ Involution
3. * and / Multiplication, and Division
4. + and – Addition and Subtraction

 
If a formula includes the operators of same priority, for example, a formula having both a summation operator and a subtraction operator, then the priority of operators will be from left to right.

We can influence this order by using parentheses ().
For example: 2 * (3+4), will not give the same result as 2 * 3 + 4, or (2 * 3) + 4

This is more of a math lesson than an Excel lesson.

Entering Formulas

Each formula must begin with an equal sign (=), followed by values and operators.

Let us say, you have 10 in cell A1 and 20 in cell B1.
If we want to make the sum of cells A1 and B1 cell, we type = A1 + B1 in cell C1, and click Enter.
A second possibility is, you type the equal sign, select cell A1 with your mouse and type +, select cell B1 with your mouse and click Enter. This does the same.

If we now change the number in cell A1 or B1, then the sum is automatically adjusted in cell C1.
This is one of the best features of Excel, and one of the reasons we minimize entering the numbers in “Formulas”.

When we click the Enter key in the result of the formula cell, we can see the formula in the formula bar.
Below are some examples of “Formulas”:

Relative and absolute cell references

As previously mentioned, a cell is the intersection of a column with a row.
Each cell has a cell address. The cell address consists of the letter of the column and row number.
The cell address of the selected cell is listed in the name box.

Ok, now we know what a cell address is, we can refer to it in our formula, eg = A2 * B2.
If you copy this formula, the cell references in this formula are automatically copied.
For example, you have the formula = A2 * B2 in cell C2, and if you copy it to cell C3, then the copied formula will automatically adjust, and it becomes = A3 * B3.
This is called a relative cell reference.

However, if you refer to a cell that should remain the same in your formula, place a dollar sign ($) for the column and row number.
You copy your formula down, up, left or right, the cell reference with the $ characters will always remain the same.

This is called an absolute cell reference.

You can also use a semi-absolute cell reference eg: B $ 2
This will take the same row, but the column will be adjusted.
For example: I have the formula A2 * B $ 2 and if I copy it to the bottom right, I get B3 * C $ 2
The first cell reference (A2) is automatically adjusted because this is relative.
In the second cellreference, the column is adapted (B) because this is relative, and the second part ($ 2) is not adjusted because it is absolute.

This can of course also be the other way around, $ C2.
Then the column is absolute and row is relative.

Another tip, to quickly navigate between different cell references, double-click the cell containing the formula, select the cell, and click the F4 key on your keyboard.

Awesome!
You've completed Lesson 27
START NEXT LESSON