Working with Formulas in a Spreadsheet - E-Help

FUNCTIONS AND FORMULAS
Working with Formulas in a Spreadsheet
Here are some basic rules for working with formula.
1.
ALWAYS start a formula with an = sign. This lets Excel know that you are creating a formula, not just entering text or numbers.
2.
NEVER put numbers in formula, ONLY cell references. Always use the references of the cells you wish to act upon in your formula. Then, if the numbers in the cells change, the result of the formula will automatically update to show the correct answer.
3.
Leave an empty row between the data and the totals row, but include the empty cell in the total. This is not a necessity, but it does make it easier to add extra rows into your data table, that will then be automatically included in the totals. It is also important when you start sorting your data.
FUNCTIONS AND FORMULAS
To Create A Basic Formula
Select the cell to contain the formula
Type an = sign
Enter the cell references that you wish to act upon and the appropriate mathematical operators between each cell reference. These are the four main mathematical operators used in formula to perform calculations on your data. When the formula is complete, press the [Return] key
If you wish to create a formula that contains a mixture of operations, you will need to use brackets to let the spreadsheet know which operation should be performed first.
For example: =(A1+B1)*C1will add A1 to B1 and then multiply the result by C1
Whereas: =A1+(B1*C1)will multiply B1 by C1 and then add the result to A1
Page 1
FUNCTIONS AND FORMULAS
CREATING TOTALS
If you need to add up a large number of cells, you will not want to create a long formula, i.e. =A1+A2+A3+A4+A5+A6+A7+A8+A9 etc.
To perform calculations on large ranges of cells, you must use a shortcut to express the range of cells, and then a Function to say what you would like to do to that range of cells.
Example
The range of cells A1, A2, A3, A4, A5 can be expressed as (A1:A5)
The Function for adding up a range of cells is SUM
All formula must start with an = sign
The formula to total this range of cells is =SUM(A1:A5) [ =function (range)]
To Total A Large Range Of Cells
1. Select the cell you wish to contain the total
2. Type = to start the formula
3. Type the Function for adding cells, SUM
4. Type the open brackets character (
5. Click on the first cell in the range
6. Type a colon : if using Excel or a semicolon ; if using Open Office Calc
7. Click on the last cell in the range
8. Type the close brackets character )
9. Press [Return] to finish the formula
Another way to select a range of numbers to be used in a function as described above is to:
1. Select the cell you wish to contain the total
2. Type = to start the formula
3. Type the Function for adding cells, SUM
4. Type the open brackets character (
5. Click on the first cell in the range and hold the left mouse button down
6. Drag your mouse to the last cell and then release the left button
7. Type the close brackets character )
8. Press [Return] to finish the formula
Page 2
FUNCTIONS AND FORMULAS
AUTOSUM ­ As calculating totals is the most common formula used, there is a toolbar button that can be used to automatically create the formula for you. It is called the AutoSum button.
1. Select the cell you wish the total to appear in
2. Click on the "AutoSum" icon on the Standard Toolbar. You may have to click on ‘More Buttons’ on the toolbar to find the “Autosum” button. 3. The Spreadsheet will guess which cells you wish to add up, by looking for the nearest group of cells. A flashing dotted line will appear round the range of cells it has guessed you wish to add up. You must check this range to see if it is correct. 4. If it is correct then click on the "green tick button" in the formula bar or press [Return] to finish the formula.
5. If it has guessed INCORRECTLY then you will need to redefine the range that it is trying to add up. See section before on how to select a range for a formula.
EDITING AND DELETING A FORMULA
When you create a formula in a cell, the result of the formula will be displayed in the cell. If you wish to view or edit the actual formula, you must use the Formula Bar.
To Edit A Formula
Select the cell containing the formula
The formula will be visible in the Formula Bar.
Click in the Formula Bar, and make the appropriate changes
To okay your changes, click on the "green tick" button on the formula bar, or press [Return]
COPYING FORMULA ­ If you need to total up several columns of data, you can create the total for the first column, and then copy the formula across into the neighbouring columns.
Because a Spreadsheet formulae think in relative terms (to the cells that they are acting upon), when you copy a formula it will usually update to total the correct data.
For example, in the picture above, the cell A6 contains the formula =SUM(A2:A5).
Page 3
FUNCTIONS AND FORMULAS
Thus cell the formula, in relative terms, is thinking that it must add up the four cells above it. When you copy the formula into cell B6, the formula is still thinking that it must add up the four cells above it, so it changes the references in the formula to =SUM(B2:B5) to reflect the move.
The easiest way to copy formulae, is to use the AutoFill feature. (See Entering Data and Autofill)
OTHER FORMULA FUNCTIONS ­ There are many functions that you can use when working on a spreadsheet. The best way to find an appropriate formula functions is to use the Function Wizard. To get into the Formula Function Wizard you select:
1.
2.
3.
Insert
Function.... which brings up the wizard screen (this is the wizard from Open Office Calc – the one in Excel functions the same but looks different.
As you scroll down the list of functions the description describes what the function calculates.
When you find the function you wish to use, you select the next button (or OK in Excel) to proceed. Follow the instructions and your function is constructed for you. Page 4