04 Using Formulae and Functions
Difficulty
Level: Beginner
Excel Version:
XP
Assumed Knowledge:
None
The aim of the tutorial is to:
explain and show you how to create mathematical formulae, perform calculations and use functions on the data in your worksheet.
Formulae and Functions
Excel is a spreadsheet programme that allow you to do more than just present numerical data in tables. It also allows you to create mathematical formulas and execute functions and this handout will show you how to create and use these.
Basic Formulae
Excel enables you to perform calculations ranging from adding the values of two cells together to performing more complex calculations. Formulae are entered in worksheet cells and always begin with an equal sign "=". Each formula then includes the addresses of the cells whose values will be included in each formula with mathematical operands placed in between. After the formula has been typed into the cell, the calculation can be performed immediately and the formula seen in the formula bar.
To add, subtract, multiple or divide two cell values:

NOTE: Cells in formulae do not have to be adjacent to each other. They can be anywhere on the worksheet. You just need to enter each cell reference correctly.
Copying and Pasting formulae
It is likely that on a worksheet the same calculations are to be performed on different sets if numbers. Rather than having to enter the same formulae in to different cells it is quicker to copy a formulae and paste it in to a new cell.
The illustration above shows the sum of office hours and over time worked in the 'Total hours' column for each day of the week. The formula in cell D2 is "=B2+C2", in cell D3 is "=B3+C3" and in D4 is "=B4+C4". A similar formula is required in cells D5, D6, D7 and D8. Rather than rewriting the formula in each of these cells it is possible to copy the formula from cell D2, D3 OR D4 to each of these cells. Excel will make a slight change to the formula so that it corresponds to the B and C columns but uses figures from the correct row, i.e. the formula in D5 will be "=B5+C5".
To copy and paste a formula from one cell to another:
To learn how to peform calculations using figures on different worksheets click here.
Relative, Absolute and Mixed Cell Referencing
Each cell has a reference and these cell references are used in formulae. However, formulae can include relative reference, absolute referencing and mixed referencing.
Relative referencing
To call a cell by its column and row label, such as "A1", is called relative referencing. When a formula contains relative referencing and is copied from one cell to another, Excel does not copy the formula in to the new cell exactly. Excel changes the cell address relative to the new cell and its row and column labels. So in the example at the top of this document, the formula entered into cell D2 is "=B2+C2" and when it is copied in to cell D3, then Excel will change the formula to "=B3+C3".
Absolute referencing
If a cell reference is to remain unchanged when copied to a new cell is called absolute referencing. A dollar sign "$" placed immediately before the row or column label indicates that that reference is absolute and should not be changed when the formula is copied to another cell. So using the above example, if the formula in cell D2 is "=$B$2+$C$2" and is copied to cell D3, the formula will be copied exactly. In other words, the formula in D3 will also be "=$B$2+$C$2".
Mixed referencing
Mixed referencing can be used where only the row OR column must remain unchanged when a formula is copied to a new cell. For example, in the formula "=(B$2+$C2)", the row of cell B2 is fixed and the column of cell C2 is fixed.
Basic Functions
Functions are predefined formulas that perform calculations by using specific values, called arguments, in a particular order, or structure. Functions can be used to perform simple or complex calculations. The functions immediately available on the standard tool bar include the Sum, Average, Count, Max and Min functions.
In the illustration below cell C9 has been chosen to show the sum of the values in the cells ranging from to C2 to C8. When the AutoSum button has been activated the cell address window at the top left will contain the function name SUM, a blue dotted border will appear around the range of cells containing values to be summed, the formula =SUM(C2:C8) will appear in the formula bar with a : between the two cell references indicating a range of cells, and the also in the cell where the result will appear:

In this example the formula shows that the correct cells have been identified. When the ENTER button on the keyboard is pressed the result will appear in the selected cell:

To perform an AutoSum function:
To find the average value of a range of two or more cell values:

To find the number of cells in a range of cells:
To find the maximum or minimum cell value in a range of cells:
To perform more complex functions using the Insert Function box click here.
Exercises
For exercises to practice the above click here.