You are on page 1of 10

Microsoft Excel

2002 & 2003

Fantastic Formulas

Challenge City Learning Centre
North Avenue
Bradford
BD8 7ND
Tel: 01274 362075
www.challengeclc.co.uk

Contents Formulas____________________________________________________________3 Commonly Used Formula______________________________________________3 Sum______________________________________________________________3 Average___________________________________________________________3 Min_______________________________________________________________3 MAX______________________________________________________________4 COUNT____________________________________________________________4 COUNTIF__________________________________________________________4 COUNTA___________________________________________________________4 PROPER. UPPER AND LOWER________________________________________5 TRIM______________________________________________________________5 CONCATENATE_____________________________________________________6 LEFT______________________________________________________________6 RIGHT_____________________________________________________________6 TODAY____________________________________________________________7 NOW______________________________________________________________7 VLOOKUP_________________________________________________________7 HLOOKUP_________________________________________________________8 IF_________________________________________________________________8 Evaluate A Nested Formula__________________________________________10 © Challenge City Learning Centre 2 of 10 May 2006 .

They simplify the process of entering formulas and are known as functions. Excel has also a number of pre-written formulas that carry out common and more complicated calculations. to calculate the total in cell B9 use: =SUM(b4:b8) Average Calculates the average (mean) figure. to identify the lowest price.Formulas Formulas are equations that perform calculations on values in your worksheet. Commonly Used Formula Sum Adds all neighbouring numbers in a row or column. In this example. use: =MIN(b4:b8) © Challenge City Learning Centre 3 of 10 May 2006 . In this example. A formula starts with an equal sign =. to calculate the average price of all the tuck shop items. In this example. use: =AVERAGE(b4:b8) Min Identifies the minimum (lowest) number in a range of data.

to count the cells containing data use: =COUNTA(B4:B8) © Challenge City Learning Centre 4 of 10 May 2006 . In this example. In this example. In this example.30") The criteria COUNTA Counts the number of cells that contain data (not empty) in a range or array.MAX Identifies the maximum (highest) figure in a range of data. In this example. to count the items that cost £0."=0.30 use: =COUNTIF(B4:B8. to identify the most expensive item use: =MAX(b4:b8) COUNT Counts the number of cells that contain numbers. to count the number of items in the tuck shop use: =COUNT(b4:b8) COUNTIF Counts the number of cells within a range that meet the given criteria.

particularly if you have copied information from another application. You can use TRIM on text that you have received from another application that may have irregular spacing. It converts all other letters to lowercase letters. © Challenge City Learning Centre 5 of 10 May 2006 . To change… amy to Amy Use… =PROPER(A4) amy Franks to all upper case =UPPER(A4) Amy Franks to all lower case =LOWER(A4) Replicate these and you will change all the values to the required case. removing spaces and altering the case as required. PROPER. To remove the space before amy Franks use: =TRIM(A4) To remove the space and change the case at the same time use: =PROPER(TRIM(A4)) You can replicate these formulas to amend the other cells. TRIM Removes all spaces from text except for single spaces between words. UPPER AND LOWER Capitalises the first letter in a text string and any other letters in text that follow any character other than a letter.Text Formulas Text formulas can be a great time saver. or imported information that is displayed incorrectly.

this function will join the two together: To join Amy and Franks together. RIGHT Separates characters on the right. use: =CONCATENATE(A4.5) This tells Excel to start on the left and take the first five characters.2) © Challenge City Learning Centre 6 of 10 May 2006 . In this example. LEFT Separates characters on the left.CONCATENATE Joins several text strings into one text string." ". to separate the ID number from the name use =LEFT(A4.B4) The inverted commas denote a space. For example if you have the first name in one cell and the surname in an adjoining cell. to separate the Class from the name use: =RIGHT(A4. In this example.

(If the cell format was General before the function was entered.FALSE) The cell value you wish to look up in your separate table.) To input the date in cell B3 use: =NOW() VLOOKUP Searches for a value from your spreadsheet in a separate table of data (where data runs vertically in columns) and returns a value in from that separate table. The column number of the actual value you are looking for. the result is formatted as a date.$A$17:$B$21. © Challenge City Learning Centre 7 of 10 False: to find an exact match. the result is formatted as a date.TODAY Returns the serial number of the current date.2. To add the supplier (currently held in a separate table of data) use: =VLOOKUP(A6. May 2006 .) To input the date in cell B3 use: =TODAY() NOW Returns the serial number of the current date and time. (If the cell format was General before the function was entered. The serial number is the date-time code used by Microsoft Excel for date and time calculations. True: to find the nearest match. The range of the table to look up (table array).

To add the Fat Content (currently held in a separate horizontal table of data) use: =HLOOKUP(A6."Green". Use IF to conduct conditional tests on values and formulas. IF Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. Use IF function to determine the healthy category for each item – if the Fat Content is less than 18 then enter Green. The cell value you wish to look up in your separate table. True: to find the nearest match. The column number of the actual value you are looking for. enter Red: =IF(C6<18. The value to be returned if test is FALSE The value to be returned if test is TRUE © Challenge City Learning Centre 8 of 10 May 2006 ."Red") The logical test: can only be answered True or False.FALSE) False: to find an exact match.HLOOKUP Searches for a value from your spreadsheet in a separate table of data (where data runs horizontally in rows) and returns a value in from that separate table.2. The range of the table to look up (table array). If not.$A$24:$E$25.

Insert Function Typing in more complicated formulas can be difficult and time-consuming. 2. to build the formula. Click the Insert Function button: The dialog box will be displayed. 1. If you know which category it is in then select it. click the ‘Or select a category’ drop down list. © Challenge City Learning Centre 9 of 10 May 2006 . The Insert Function button guides you through the process and builds the formula accordingly. Follow the information at the bottom of the box. if not select All. If the function you wish to use is not displayed. The most recently used functions are displayed. The Function Arguments dialog box is then displayed: 3.

you can see this in the following formula where the function AVERAGE(F2:F5) is shown as its value. For example. If the underlined part of the formula is a reference to another formula. To end the evaluation. Only one cell can be evaluated at a time. then the nested function must return a TRUE or FALSE. point to Formula Auditing. and names.0) as =IF(80>50. Click Step Out to go back to the previous cell and formula. (Arguments: the values that a function uses to perform operations or calculations. 4.SUM(G2:G5). text. the AVERAGE function and the SUM function are both second-level functions because they are arguments of the IF function. 2. On the Tools menu.Nested Formulas In certain cases. To see the evaluation again.) For example.0) 1.SUM(G2:G5). click Restart. cell references. A function nested within the AVERAGE function would be a third-level function. For instance. you may need to use a function as one of the arguments of another function. Function B is a second-level function. The result of the evaluation is shown in italics. Microsoft Excel displays a #VALUE! error value. Valid returns When a nested function is used as an argument. When Function B is used as an argument in Function A. The type of argument a function uses is specific to the function. If it doesn't. it must return the same type of value that the argument uses. 80. and so on. © Challenge City Learning Centre 10 of 10 May 2006 . the following formula uses a nested AVERAGE function and compares the result with the value 50. click Step In to display the other formula in the Evaluation box. if the argument returns a TRUE or FALSE value. Click Evaluate to examine the value of the underlined reference. Select the cell you want to evaluate. 3. Continue until each part of the formula has been evaluated. Evaluate A Nested Formula You can see the different parts of a nested formula evaluated in the order the formula is calculated. For example. =IF(AVERAGE(F2:F5)>50. and then click Evaluate Formula. click Close. Common arguments that are used within functions include numbers. Nesting level limits A formula can contain up to seven levels of nested functions.