EXCEL 2010: FORMULAS AND FUNCTIONS BASIC FORMULA RECAP To start creating a formula, click in a cell where you wish formula to appear. Note: all formulas begin with the equal sign (=) to allow Excel distinguish between Formula type and Number and Label (text) types. Most common formulas include addition (+), subtraction (-), multiplication (*) and division(/). While you are typing (or inserting) your formula in a cell, it appears in the Formula bar as well. Formula bar To complete the formula, use the Blue tick on the Formula bar (or press the Enter button). FUNCTIONS Excel Functions are built-in pre-defined formulas which perform calculations, saving you time in manually setting up formulas and ensuring their accuracy. 1. Click on Formulas tab – see the Function Library group. Commonly used functions such as SUM, Average, MIN, MAX and COUNT are available from the AutoSum drop-down list. There are other groups of functions available: Financial, Logical, Date & Time, etc. 2. Click on the Group required e.g. Financial 3. Click the function required. (If you are unsure if it is the function you require - hover over the functions’ names – see the screen tips on the function appears) Page 1 of 4 USING SUM FUNCTION 1. Click in a cell which will display the result of calculation. 2. Drop-down the list of AutoSum functions in the Function Library group on the Ribbon. 3. Select Sum from the list – see the function entered and the range of cells selected. 4. If happy with the selection, click the blue tick on the formula bar. 5. If the selection needs to be adjusted, click on the first cell to be selected, then with the left mouse pressed, drug your courser over the cells to be included in the formula, when the selection is correct, click on the blue tick on the formula bar. You can use the same technique to calculate average, minimum, maximum and count the cells containing numbers. You can always type a function in yourself if you can remember how it is structured, for example: To add cell contents together (for example A1 plus B1): To subtract cell contents (for example A1 minus B1): To multiply cell contents (for example A1 times B1): To divide cell contents (for example A1 divided by B1): To add a range of cells together (in this case A1 to A10 range): To average a range of cells (in this case A1 to A10 range): To find the minimum amount in a range (in this case A1 to A10 range): To find the maximum amount in a range (in this case A1 to A10 range): A more complex formula has brackets (tells the computer which part requires calculating first): =A1 + B1 =A1 – B1 =A1* B1 =A1 / B1 =SUM(A1:A10) =AVERAGE(A1:A10) =MIN (A1:A10) =MAX (A1:A10) =(A13 – A12)/A13 COPYING FORMULA ACROSS (AKA. REPLICATION) 1. Hover your cursor over the bottom-right corner of a cell which contains formula – see it changing to a black cross. 2. Press left mouse button, keep it pressed and drag your cursor (which is still over the black cross) over the cells you wish to copy your formula to. 3. Release the mouse button. + + Page 2 of 4 IF FUNCTION If functions allows you to use a condition, and perform one calculation if condition is met, and a different one is condition is not met. For example, if the exam pass mark is 70, we can set a logical test that checks if the actual mark is below 70 and shows ‘fail’ as a result of calculation, and if it’s above or equals 70 it shows ‘pass’. 1. 2. 3. 4. 5. 6. 7. Choose the cell to insert the function. Click on the insert function button – see the Insert Function window. Insert IF function either from the list of recently used or all functions Let’s say K5 cell contains the mark. Logical test is to check if the mark in K5 is lover then the pass mark If it’s true, if the actual mark is below the mass mark it’s a fail If the logical test is false, if the actual mark is not lower than the pass mark, then it’s a pass. CONDITIONS You can have a variety of different logical test conditions for your IF function. In the example on the previous page we searched for a fail mark less than 70. The symbol we used here was <. Other operators include: Operator = > < >= <= <> Use Equal to Greater Than Less Than Greater Than Equal To Less Than Equal To Not Equal To Limits Text and numbers Numbers only Numbers only Numbers only Numbers only Text and numbers TRUE OR FALSE VALUES – SECTION 2 & 3 OF THE IF FUNCTION To display set text as a result, you must place text in “double quotes”. To display numerical results, no quotation marks are required. Page 3 of 4 FIXED / ABSOLUTE CELL REFERENCING To make a cell reference in a formula fixed, i.e. when the formula is replicated the cell reference is still looking at the same cell, we need to use the $ (dollar) symbol – to ‘lock’ the cell in place. To make a cell reference in a formula fixed, so when it is dragged either across columns or down rows, it remains locked: type a $ symbol before the cell column reference and the cell row reference, e.g. $F$5 (fixed cell referencing is officially called ABSOLUTE CELL REFERENCING). A shortcut for entering fixed references whilst creating the formula is by pressing function key F4 instead of typing the dollar signs. See Example to see Fixed Cell Referencing working. Have a look at this example below: The SUM function is used to calculate the totals in column E. There is an average function to calculate the average mark in cell E11. Fixed cell referencing is used in the calculation in F3. This locked in position the reference to cell E11 – so when the formula is replicated down the cell referencing looked at the marks for the next person down in the list and compared it with the average in E11. Page 4 of 4 Microsoft images used with permission from Microsoft