Credit value: 10 27 Spreadsheet modelling The spreadsheet and the word processor were the business applications that started the personal computer revolution, and they remain the most popular and useful applications. The popularity of spreadsheets comes from their ability to carry out financial calculations with ease. But the software is very versatile and, in addition to its financial and mathematical uses, it can be utilised for a number of other applications such as maintaining simple lists and databases, presenting data as charts and graphs, and creating complex tables of text and numbers. Spreadsheets are also widely used in business, science and other areas to create models. A spreadsheet model helps you answer a question, such as ‘How much will it cost me to run a car?’, or predict a likely future outcome, such as ‘How much profit will my business make next year?’ For these reasons, they are a powerful tool for planning. This unit links closely with Unit 9: Customising software, which covers improving spreadsheets and other applications software by introducing templates, shortcuts and macros. Learning outcomes After completing this unit you should: 1. know what spreadsheets are and how they can be used 2. be able to develop spreadsheet models 3. be able to test and document spreadsheet models. 1 BTEC’s own resources Assessment and grading criteria This table shows you what you must do in order to achieve a pass, merit or distinction, and where you can find activities in this book to help you. To achieve a pass grade the evidence must show that you are able to: To achieve a merit grade the evidence must show that, in addition to the pass criteria, you are able to: To achieve a distinction grade the evidence must show that, in addition to the pass and merit criteria, you are able to: M1 refine a spreadsheet model D1 evaluate a spreadsheet P1 describe the uses of spreadsheet software See Assessment activity 27.1 on page 8 P2 explain why spreadsheets may need to be converted to alternative file formats See Assessment activity 27.1 on page 8 P3 develop a spreadsheet model to meet particular needs See Assessment activity 27.2 on page 35 by changing rules and values See Assessment activity 27.3 on page 40 P4 use simple formulae and D2 use automated features in the functions to process information See Assessment activity 27.2 on page 35 P5 use data types and formatting to present information See Assessment activity 27.2 on page 35 P6 use appropriate tools to present data See Assessment activity 27.3 on page 40 P7 test a spreadsheet to ensure that it is fit for purpose See Assessment activity 27.4 on page 42 P8 produce user documentation for a spreadsheet model See Assessment activity 27.4 on page 42 2 model suggesting further refinements See Assessment activity 27.2 on page 35 spreadsheet model See Assessment activity 27.4 on page 42 M2 justify choice of tools for presenting data See Assessment activity 27.3 on page 40 M3 analyse and interpret data from a spreadsheet model See Assessment activity 27.3 on page 40 Unit 27 Spreadsheet modelling How you will be assessed This unit is internally assessed. You will provide a portfolio of evidence to show that you have achieved the learning outcomes. Your portfolio of evidence can be supplied in many formats including electronically as well as paper-based. The grading grid in the specification for this unit lists what you must do to obtain pass, merit and distinction grades. The Assessment activities in this unit will guide you through tasks that will help you to be successful in this unit. Your tutor will tell you exactly what form your assessments will take, but you could be asked to produce: • • written documentation, for example a short report, spreadsheet files practical work • a pamphlet or leaflet • annotated screenshots • a presentation. Feroz Kapoor, a 15-year-old BTEC First learner I really enjoyed this unit. Spreadsheets are amazing because there’s so much they can do and there’s always more to learn about them. I’d already learned the basics of using spreadsheets before I did this unit, so I was worried that I’d find it a bit boring. But we didn’t spend a lot of time on the basics. The unit is more about building spreadsheets which answer the sort of questions you might come across in business. In the future I really want to run my own business, so for me learning about how to use a spreadsheet to plan and forecast things like business costs and profits was really interesting. The assessments for this unit were quite hard, especially the merit and distinction ones. I had particular trouble justifying my choice of a chart for presentation data (M2) and evaluating my spreadsheet and suggesting refinements (D1). Our tutor suggested we got together in small groups and discussed each other’s spreadsheets. It turned out it was much easier to suggest improvements on other people’s spreadsheet models than on our own. I think we thought our own ones were perfect! We also came up with some good ideas for justifying spreadsheets – by comparing the numerical data and the chart, you could see how much easier it was to make sense of the data from the chart. Over to you! • Do you know something about how to use spreadsheets already? • What sort of things should you think about when you need to justify using a certain feature? 3 BTEC’s own resources 1. Know what spreadsheets are and how they can be used Start Warmup up Ideas for spreadsheet models A model is something that mimics real life. With a model you can make predictions or plans and try to answer questions. There are lots of things you might want to model, such as ‘How many merit grades do I have to get on this course to get a merit overall?’ or ‘How many matches does my team need to win to come top of the league?’ We tend to think of spreadsheet models in a business or financial context, but there are many more areas where creating a model is useful or interesting. In a group, discuss the sorts of models you would like to create. • Choose one idea for a model from those you discussed. • What kind of data will you need to build your model? • Could you use a spreadsheet to build your model? Key terms Workbook – a spreadsheet file, which is made up of a group of worksheets that are saved together in a single file. A spreadsheet workbook is made up of tables known as worksheets, with rows and columns making up individual cells. The columns are labelled with letters of the alphabet and the rows are numbered. Each cell has an address, which is its column letter and row number. Worksheet – a page of tables used to create a spreadsheet. Figure 27.1: A worksheet 4 Unit 27 Spreadsheet modelling Activity: Spreadsheet size and quantity • What happens after column Z? • How many rows and columns does a worksheet have? • How many cells does this provide? If you want a real challenge, find out what other limits there are in Microsoft® Excel®. For example, how many different worksheets can you have in one workbook (spreadsheet file)? By default, a spreadsheet has three worksheets, but you can add more if required. A single spreadsheet workbook can, therefore, hold a very large amount of data. There are basically three things you can enter in a worksheet cell: • Text can be formatted in a variety of ways, for example you can change its font, size or colour. • Numbers can be formatted depending on what kind of numbers they are. For example, you can choose the Currency format, which will display a number with a currency symbol in front (£ in the UK) and two digits after the decimal point. You can also format the appearance of numbers in the same way as you can text. We’ll look at formatting in more detail later. • Formulae are what make spreadsheets really useful. A formula carries out a calculation on numeric values in other cells. We’ll also look at formulae in more detail later. Many people also use spreadsheets as simple databases to store flat file data, i.e. single database tables. 1.1 Uses of spreadsheets Spreadsheets are very flexible and are used for all sorts of applications. They are most commonly used for storing, manipulating and analysing numeric data. The table structure of the worksheet makes it ideal for storing values that represent something, such as the number of sales made in each month of the year or a learner’s mark in an assignment. Key terms Formulae – used to carry out calculations in a spreadsheet. A formula must begin with an equals sign (=) and can use either actual values (numbers) or references to cell addresses. Value – a number which can either be a fixed number entered by the spreadsheet’s user or a number that is calculated by a formula. Activity: Spreadsheet uses in industry and commerce • Do you know anyone who uses spreadsheets in their business? Find out what they use them for. • Do your tutors use spreadsheets for keeping track of your progress on this course? Look into how staff at your centre of learning use spreadsheets and find some examples of the spreadsheets they use. 5 BTEC’s own resources Case study: NEAL training NEAL training is a small private training company that offers vocational training for job seekers under contract to local job centres. They need to keep track of their learners’ attendance and punctuality, and meet the targets set by the organisations that fund the training. Alice Haynes, the training manager, uses a spreadsheet to keep track of this data; an example is shown in Figure 27.2. The spreadsheet uses formulae to calculate the weekly percentages for attendance and punctuality for each of the training programmes that the company runs. It also uses an If function (see pages 16–18) to highlight the programmes that have below-target attendance or punctuality. Charts are drawn from the data to help identify trends and problem areas. Alice says: ‘Although in some ways this kind of data might be better suited to a database application, it’s quicker and easier to set it up using Excel®. Also, my director prefers me to use spreadsheets to record information because he understands them well. The charts are useful because they make it easy to see at a glance where the serious problems lie.’ 1. What reasons does Alice give for preferring to use a spreadsheet rather than a database? 2. What disadvantages might there be to using a spreadsheet rather than a database in this application? 3. Does your tutor collect or use statistics on attendance and punctuality? If so, how do they store and present that data? Figure 27.2: Weekly attendance and punctuality spreadsheet Presenting and interpreting information Large quantities of data can be stored in a spreadsheet. But lots of numbers can be difficult to interpret, making questions such as ‘Is the value of sales we make each month increasing or decreasing?’ difficult to answer. Therefore, spreadsheets provide tools, such as charts and graphs, to enable you to present data in different ways and make interpretation easier. It is much easier to see trends and to identify relationships between data when looking at a graph than it is by looking at ‘raw’ figures. 6 Unit 27 Spreadsheet modelling Calculations Spreadsheets are also useful for carrying out calculations repetitively and, as long as the initial formulae are correct, you can rely on the spreadsheet to be accurate. This can be useful in spreadsheets such as monthly salary calculations. List management The ability to manage and manipulate large lists of data is also one of the spreadsheet’s strengths. This facility allows you to use a spreadsheet like a simple database. 1.2 Alternative formats In addition to the standard format for saving spreadsheets (for Excel® this is known as the xls format because the file extension is .xls), there are a number of alternative formats you can use for different purposes. These include: • PDF (Portable Document Format). When you save a spreadsheet as a PDF it can be viewed but not edited by others. The PDF format is very widely used, so it is ideal if you want to publish your spreadsheet online and allow anyone to download and view it (even if they don’t have a copy of Microsoft® Office®). • HTML (Hyper Text Markup Language). Saving your spreadsheet as HTML means you could include the spreadsheet as part of a web page. As with PDF, your spreadsheet can be viewed but not edited in this format. • CSV (Comma Separated Values) file. This is a text file with the contents of each cell separated by a comma. This format can be used to import the spreadsheet data into a database application. • TXT file. This is a plain text file. • XML file. This is an industry standard format so is useful when you need to export spreadsheet data to other applications (especially non-Microsoft® ones) such as a database. When you save your spreadsheet in any of these formats, the formulae are converted to values. This means you have created a ‘final’ version of the spreadsheet. Did you know? To find out more about the different file formats for saving spreadsheets, use the Help facility in Excel® and search for ‘File formats’. Did you know? You can download a free PDF viewer from the Adobe® website. To access this site, go to Hotlinks and click on the link for this unit. Just checking 1. 2. 3. 4. What is the difference between a workbook and a worksheet? Why might you want to save a spreadsheet as a PDF file? Name one tool provided by spreadsheets to help analyse and interpret data. How are the rows and columns of a worksheet identified? 7 BTEC’s own resources Assessment activity 27.1 PLTS Researching the different uses of spreadsheets will provide evidence that you are an independent enquirer. Functional skills P1 P2 You have recently taken a job as a trainee IT support specialist at a university. The IT manager has asked you to write a guide for non-technical lecturers about how they can use spreadsheets for different tasks P1 . The guide also needs to explain why spreadsheets may need to be converted to other file formats P2 . Grading tip •To make sure you cover all the required material, check the unit content in the specification under Learning outcome 1. Writing the guide will provide evidence for your Functional English skills in writing. 2. Be able to develop spreadsheet models 2.1 Formulae Key terms Formula bar – in Excel® this is located under the Ribbon and shows the formula of the current cell (if it contains one). The cell itself shows the result of the formula. Cell pointer – indicates the current cell. Before you can enter anything into a cell, you must move the cell pointer using the cursor keys or the mouse to the cell where you want to make the entry. Figure 27.3: The formula bar 8 Formulae provide the real power in spreadsheets. They are used to carry out calculations. The key thing to remember is that, if you want to enter a formula in a cell, it must begin with an equals sign (=). Let’s look at a simple example. The following formula will add together two numbers: =6+8 If you type this formula into a spreadsheet cell, the cell will display the answer: the number 14. That’s because the cells in the worksheet display the result of the formula; the formula itself is displayed in the formula bar when the cell pointer (the thick black box around a cell) is located on that cell (see Figure 27.3). Unit 27 Spreadsheet modelling The cell pointer can be moved by the mouse by clicking in the cell where you want it located, or by using the cursor keys to move one cell at a time. Entering actual values in a formula is fine, but it is much more useful to be able to enter a cell address instead. If we enter the value 6 in cell B5, we can change our formula to the following: Key term Cell address – the method used to refer to the contents of a particular cell in a formula. The cell address consists of the column letter and row number of the cell. =B5+8 You can edit the formula by clicking in the formula bar, deleting the number 6 and typing the cell address B5. The result of the formula (in C5) will still be 14. However, if we make a change to the value in B5, e.g. entering 12 instead of 6, the formula in C5 automatically recalculates the new result. Figure 27.4 shows the changed formula. Figure 27.4: Formula using cell address You can write a formula to add, subtract, divide, multiply and raise to power. The symbols you need to use are shown in Table 27.1. Table 27.1: Arithmetic symbols Symbol Meaning + Add - Subtract * Multiply / Divide ^ Raise to power 9 BTEC’s own resources 2.2 Spreadsheet models A financial spreadsheet model Let’s look at a simple example of how a spreadsheet model can be used. Imagine you are saving money to buy a car that costs around £1,500. You want to buy the car in about nine months’ time, but you don’t know how much you’ll need to save each month to reach your target. The spreadsheet shown in Figure 27.5 shows the basic layout. Figure 27.5: ‘Saving for a car’ spreadsheet The amount saved each month in B4 is a number, and so is the number of months in D4. These two amounts need to be multiplied together to give the total amount saved. A formula is needed in F4, which is: =B4*D4 The target amount in H4 is entered as the value of 1500. The shortfall (or surplus) is the difference between the amount saved (in F4) and the target amount in H4. The following formula will calculate the shortfall: =H4-F4 Figure 27.6 shows the spreadsheet completed, with example values in cells B4 and D4. Figure 27.6: Completed spreadsheet 10 Unit 27 Spreadsheet modelling This demonstrates one of the main benefits of spreadsheets – as the formulae are constantly recalculated, we can change the amount saved each month (in B4) and the number of months (in D4) to investigate different possibilities. This kind of spreadsheet is sometimes called a ‘What if...?’ spreadsheet, since we can use it to answer questions such as: • What if you could only save £75 a month? Changing the number of months shows it will take 20 months to save for the car. • What if you choose a cheaper car, costing £900? Keeping the number of months as nine, how much will you need to save each month? A budget spreadsheet Another common type of spreadsheet is the budget spreadsheet. In this type, columns of figures representing income or outgoings, to or from various sources, are totalled up. Imagine you want to estimate the monthly cost of running a car over four months. Figure 27.7 shows a spreadsheet set up to calculate monthly costs. The values entered have been formatted as currency. You can do this either by entering a £ sign in front of each value as you type it or by highlighting all the cells with the cell pointer (by dragging across them with the mouse pointer) and clicking the Currency button in the Formatting toolbar. Figure 27.7: Monthly cost spreadsheet Since the costs of petrol and insurance stay the same each month, you can enter the value once then copy and paste it into the other cells. If you highlight all the cells where you want to paste the value, you can then paste multiple copies in one go. Relative cell referencing To add up the costs for the month of January, you could enter the following formula: =C3+C4+C5 11 BTEC’s own resources Once this formula has been entered, it can be copied as well. However, when you copy formulae, something very important happens. In other applications, when you copy and paste something it stays the same, but not with spreadsheet formulae. Instead, the cell addresses change relative to the cell into which they are copied. Key terms Relative cell referencing – a cell address that changes when it is copied to a different cell. Absolute cell referencing – a cell address that does not change when you copy it. When we copy this formula along the columns (i.e. into columns D, E and F), the column letters in the formula change although the row numbers remain the same. This is exactly what we want to happen – it means the formula adds up the correct values for each month. The effect is known as relative cell referencing. Later in this unit we will look at situations where you do not want the cell addresses to change when you copy a formula – this is called absolute cell referencing (see pages 21–23). Figure 27.8 shows the completed spreadsheet. Figure 27.8: The completed spreadsheet Because spreadsheet software allows you to copy both values and formulae simply, this makes it easy to create large spreadsheets. Since the cell addresses in the formulae are automatically adjusted as you copy them, you only have to enter them once. Many financial budget spreadsheets include figures for a whole 12 months, i.e. one year. If you only have to enter a formula to add up a monthly total once, instead of 12 times, this obviously saves a lot of time. Complex formulae Mathematical precedence Mathematical precedence means the order that calculations are done in a complex formula. For example, what do you think the result of the following formula would be? =5+2*2 You might imagine that the result would be 14, because 5+2 is 7, then multiplied by 2 is 14. However, calculations in spreadsheets are not 12 Unit 27 Spreadsheet modelling done left to right. They are done based on the order of mathematical precedence, and multiplication is done before addition. So the result would be 2 multiplied by 2 is 4, then add 5 is 9. The order of mathematical precedence is shown in Table 27.2. Table 27.2: The order of mathematical precedence Order Function Symbol 1 Brackets () 2 Raise to power ^ 3 Divide / 4 Multiply * 5 Add + 6 Subtract - Did you know? Note that anything in brackets is done first, so to get the answer 14 from the previous example, the formula would need to be: =(5+2)*2 2.3 Functions In addition to the arithmetic operators we have used so far, formulae can also include functions that carry out a wide range of mathematical calculations. Excel® has hundreds of functions, but we’ll look at just a few of the most useful ones. In Figure 27.9, Column A has been widened to fit the names of the games. You do this by moving the mouse pointer into the grey title bar of the columns, between the column you want to widen and the next one (between columns A and B in this case). When the two-headed arrow mouse pointer appears, you click and drag the line to the right to widen column A. The Sum function The Sum function is one of the most widely used functions. It is used to add up a column or row of values. It is used so often that there is an AutoSum button on the Home tab of the Ribbon that automatically creates a formula using the Sum function. First, let’s look at how to use the Sum function manually, so that we can understand how it works before looking at the automatic version. Imagine you have a spreadsheet like the one shown in Figure 27.9. This spreadsheet might be used by a games shop. It lists all the games they have, the price and the number in stock. To add up the total number of games in stock, you could enter a formula in C14 that adds each cell one by one, but this would be a long-winded way of doing it. The Sum function is much easier to use – you only need to enter the starting cell (C4) and the ending cell (C14) in the list to be added, separated by a colon, like this: =SUM(C4:C13) Figure 27.9: Games Store spreadsheet 13 BTEC’s own resources If you use AutoSum button in the Ribbon, you don’t have to type anything. Just click in the cell where the formula should go (C15) and click the AutoSum button. Excel® looks for a row or column of numbers above or to the left of the currently selected cell and creates the formula using the Sum function for you (see Figure 27.10). It displays the formula for you to check, and when you press the Enter button it completes the automatic creation of the formula. Figure 27.10: The AutoSum button Activity: Using the AutoSum button Column D on the spreadsheet shown in Figure 27.10 is meant to display the value of the games in stock (the price multiplied by the quantity). Enter the correct formula in D4 and copy it down to D14, then use the AutoSum button to calculate the total value of the games in stock. The Min, Max and Average functions Key term These statistical functions work in a similar way to the Sum function, but there is no Ribbon button to create them automatically. Statistics – the science of making sense of data. To find the maximum price of a game you would enter the following formula: =MAX(B4:B13) 14 Unit 27 Spreadsheet modelling The Min function works in the same way and displays the minimum value in the range. The Average function displays the average value (or mean) across the range. Activity: Finding minimum, maximum and average values Enter the formulae to calculate the minimum, maximum and average prices of the games. When complete, the spreadsheet should look like Figure 27.11. Did you know? Figure 27.11: Spreadsheet with minimum, maximum and average prices The Count function counts the cell only if it contains a number. If the cell contains text it will not be counted. The Count and Countif functions Count is another simple statistical function. It counts the number of cells within a range that contain numbers. For example, if we use the Games Store spreadsheet shown above and enter the formula =Count(C4:C14), we will get the result 11. That’s because there are 11 cells in the range that contain a number (all of them in this case). The Countif function adds the ability to count only the values in a range that meet certain criteria. The criteria can be a single value (such as 3), a text value (such as “Yes”) or an expression using a comparison operator (such as “>10”). Note that expressions and text values must be enclosed in double quotation marks. 15 BTEC’s own resources Table 27.3 shows the comparison operators you can use. Table 27.3: Comparison operators Symbol Meaning = Equal to > Greater than < Less than >= Greater than or equal to <= Less than or equal to <> Not equal to For example, the Games Store needs to reorder games when the quantity in stock has fallen below 6. We can show the number of games that need reordering using the formula: =COUNTIF(C4:C14,“<6”) Activity: Identifying excess stock The Games Store manager is thinking of offering a discount on the price of games where there are more than 10 in stock. What formula would tell you how many games that applies to? The If function The If function is more complex than the statistical functions we have looked at so far, but it is also more powerful. It allows you to change what the spreadsheet does depending on the outcome of some kind of test. For example, if the value in a particular cell is greater than 10, you can display a message or do a calculation; whereas if the value is less than 10, you can display a different message or do a different calculation. First, let’s look at the basic structure of the If function. This has three parts within the brackets that follow the function name: =IF(test, action if test is true, action if test is false) The first part – the test The test can simply be comparing the contents of a cell with a value or with text. For example, C4=10 means ‘Does C4 contain 10?’ and C4=“Yes” means ‘Does C4 contain the text Yes?’ Alternatively, the test can use the comparison operators we have looked at with the Countif function. For example, C4>10 means ‘Is C4 greater than 10?’ The second and third parts – what to do as a result of the test The next two parts of the function describe what to do if the result of the test is true and what to do if it is false. These actions can also be a simple value or some text, for example: =IF(C4>10,“Too much”, “Not enough”) 16 Unit 27 Spreadsheet modelling In this example, if the value in C4 is greater than 10, then the text “Too much” is displayed in the cell that contains the If function. If the value in C4 is not greater than 10, then the text “Not enough” is displayed. These actions could also be a calculation, for example: =IF(C4>10, C4+2, C4-2) Here, if the value in C4 is greater than 10, then that value has 2 added to it and the result is placed in the cell that contains the If statement. If the value in C4 is less than 10, then 2 is subtracted. The If function in use Now let’s look at a real example of the If function in use. Remember the Games Store spreadsheet we used to demonstrate the other functions. On page 16 we used the Countif function to show the number of games that need reordering because the quantity in stock has fallen below six. However, this function does not tell us which games need reordering, only how many there are. With the If function we can display a message next to the game telling us to reorder it. We start off by entering the formula using the If function in cell E4. The test is ‘Is C4 (the quantity) less than 6?’ The action, if the test is true (i.e. C4 is less than 6) is to display the text ‘Reorder’. The action if the test is false (i.e. C4 is 6 or more) is to display a dash. The formula is shown in Figure 27.12. Figure 27.12: The formula using the If function 17 BTEC’s own resources Once you have entered the formula in E4, copy it down through cells E5 to E14. You can do this by copying and pasting or you can use the copy box on the current cell pointer. This is the small black box on the bottom-right corner of the current cell pointer, as shown in Figure 27.13. Figure 27.13: The cell pointer copy box When you move the mouse pointer over the copy box, it changes to a black cross. If you drag down through the cells that you want to copy into (E5 to E14) with the black cross mouse pointer, the formula will be copied for you. The completed spreadsheet is shown in Figure 27.14. Figure 27.14: The completed spreadsheet 18 Unit 27 Spreadsheet modelling Using AND and OR The If function used in the previous example was able to test only one cell (C4). However, there may be situations where you want to test the values in two or more cells and do something if both the tests are true. The AND logical operator Let’s look at an example. The Games Store wants to discount (reduce) the price of any game that costs over £26 if there are 10 or more in stock. Here there are two tests that need to be done (>£26 and >=10). We only want to discount the game if both the tests are true, so we use the AND logical operator. Figure 27.15 shows the modified If function. Figure 27.15: If function using AND The tests are now preceded by AND, like this: AND(C4>=10,B4>26) If the test is true (i.e. we have more than 10 in stock and the price is over £26), then the price in B4 has £10 subtracted from it. Otherwise the price is kept the same. The complete formula looks like this: =IF(AND(C4>=10,B4>26),B4-10,B4) Once the formula is complete you can copy it down the rest of the column. If you check carefully, you should see that the prices have been reduced on the games that meet the two test criteria, as shown in Figure 27.16. Figure 27.16: The new reduced prices (highlighted in red) 19 BTEC’s own resources The OR logical operator Using the AND logical operator means that both tests must be true for the true action to be carried out. However, if you use the OR logical operator, then the true action will be carried out if either one of the tests is true. If we modify the formula just entered to use OR, then the price of the game will be reduced if there are 10 or more in stock or if the game costs over £26. This is shown in Figure 27.17. Note that now the prices of almost all the games are reduced, since most of them meet one or other of the test criteria. Figure 27.17: Using the OR logical operator Activity: Other worksheet functions Excel® has many more functions than the few we have looked at here. Find out more about the other functions by searching in Help for ‘list of worksheet functions’. If you want a real challenge, find out how the following worksheet functions can be used and create example spreadsheets that use them: 20 • Today • Rand • Vlookup • Weekday. Unit 27 Spreadsheet modelling 2.4 Entering and editing data Absolute and relative cell referencing We’ve already introduced the concept of relative cell referencing. This is the way cell addresses in formulae change when you copy them. However, there are some situations when you don’t want the cell address in a formula to change when you copy it. The following example demonstrates why. We’ll use the Games Store spreadsheet again, but for simplicity we’ll leave out the If function formulae. This time we want to have a sale and reduce all the prices by between 5 and 15 per cent. But we want to do a bit of ‘What if...?’ experimentation to see how different percentages will affect the total value of our stock. Figure 27.18 shows the modified version of the spreadsheet with an example percentage reduction already entered in cell B16. Did you know? To enter a value as a percentage, simply type the % sign after the number. Figure 27.18: Games Store sale spreadsheet We need to enter a formula in E4 to reduce the existing price in B4 by the percentage in B16. First we multiply these two values together to get 10 per cent of the current price (£3.15). Then we need to subtract that from the current price to get the sale price. The formula we need is: =B4–B4*B16 21 BTEC’s own resources We don’t need brackets here, as the multiplication is done first anyway. If we now copy this formula down the rest of the column we find that a problem occurs, as shown in Figure 27.19. Figure 27.19: Copying the formula Did you know? Pressing the F4 key (function key on the top of your keyboard) after you have entered a cell address will insert the $ sign in front of the column letter and row number for you. Figure 27.20: An absolute reference The 10 per cent reduction has worked correctly on the first price, but none of the other prices have been reduced. If we look at the formula in E5 we can see why (look in the formula bar in Figure 27.19). Relative referencing has changed the original B4 in the formula to B5 – this is correct as the value in B5 is the price of the next game. But it has also changed B16, the cell with the percentage reduction, to B17, which contains nothing. We don’t want that part of the address to change when we copy the formula – we want it to stay fixed as B16. Fixing a cell address so that it does not change is called absolute referencing. 22 Unit 27 Spreadsheet modelling To make that part of the formula use absolute referencing, we need to return to the formula in E4 and edit it in the formula bar. Click in front of B16 then enter a dollar ($) sign in front of the B and another $ sign in front of the 16. It should now read $B$16, as shown in Figure 27.20. Now, if you copy this formula down through the column, the B4 part of the formula will change (because of relative referencing) but the B16 part will not change (because of absolute referencing). This new version of the formula will display reduced prices for all the games, as shown in Figure 27.21. If you wanted to fix only the row or the column address, instead of both, you can do this by inserting the $ sign in front of the column letter or row number only. Figure 27.21: Reduced prices for all games Activity: Using absolute referencing To complete the spreadsheet, add a formula in column F to calculate the value of the games with their reduced prices (quantity multiplied by sale price). Then use the AutoSum button to provide a new total value of the stock in cell F14. • What is the maximum percentage sale reduction that can be given while keeping the total value of the stock above £2000? Autofilling cells Spreadsheet software contains lots of features to make creating large spreadsheets easy; one of those features is AutoFill. Many budget spreadsheets have the months across the top of the columns (like the car cost calculator we created on pages 10–12). Instead of having to type each month, you can just type the first month. (It doesn’t have to be January – you can start with any month – and you can use the abbreviated version, such as Jan, if you wish.) Then use the cell pointer copy box (see page 8) to copy the cell across as many cells as you need. AutoFill will enter the month names for you, as shown in Figure 27.22. 23 BTEC’s own resources Figure 27.22: Using AutoFill to complete month names You can use AutoFill to enter the days of the week in the same way – either the full names (e.g. Monday) or the abbreviated versions (e.g. Mon). You can also enter a date (e.g. 04/07/2011) and AutoFill will fill in subsequent dates for as many days as you wish. AutoFill can also complete a sequence of numbers or dates if you show it what sequence you want. For example, to number cells sequentially, just type 1 in the first cell you want to number, then 2 in the next one. Then select these two cells by dragging across them with the white-cross mouse shape, click and drag on the copy box and keep dragging for however many cells you want to number. AutoFill will fill in the numbers for you. Another example is if you want a series of cells to show the dates on each Monday for several weeks. Just enter the first two dates – for example 22 March 2010 is a Monday, and the following Monday is 29 March 2010 – in two cells that are next to each other. Select these cells and then use the copy box to list as many Monday dates as you require (see Figure 27.23). This can make creating a timetable or schedule easy, as you don’t need to look up each date. Figure 27.23: Using AutoFill to enter dates 2.5 Automations Linking spreadsheets One of the benefits of having multiple worksheets in one spreadsheet is that you can link information between the worksheets. You can see the benefits of this by looking at some examples. There are two ways to create links: 24 • enter links between worksheets as formulae • use Paste Link. Unit 27 Spreadsheet modelling How to... Link spreadsheets using manual links Imagine you have two computer games shops – one in Luton and one in Watford. You keep a record of each shop’s sales on two worksheets in the same spreadsheet. The spreadsheet is shown in Figure 27.24, with the Luton shop worksheet currently displayed. The worksheet for the Watford shop is set up in exactly the same way – only the sales figures are different. The worksheets have been given names (look at the tabs at the bottom of the worksheets), rather than just Sheet1, Sheet2, etc. (You can do this by double-clicking on the sheet name and typing in the name you want.) Now we are going to create a third worksheet, called Total Sales, which will show the combined total sales from both the Luton and Watford shops. The basic layout of this worksheet is shown in Figure 27.25. Figure 27.24: The Games shops sales spreadsheet To copy the values from the other worksheets: • First click in cell B4, which is where the January total from the Luton shop will go. • Type an equals sign to start a formula. • Now click on the Luton shop worksheet name to swap to that worksheet. • Click in B7 on the Luton shop worksheet (which contains the January total). Notice that, on the formula bar, the address of that cell in that worksheet (‘Luton shop’!B7) has been entered. (The worksheet name is in single quotes followed by an exclamation mark and the cell name. This is the format of a cell address that contains a worksheet name.) (See Figure 27.26.) • Now press Enter to complete the formula. • You will now be returned to the Total Sales worksheet, with the value from the Luton shop worksheet displayed. This value is linked with the Luton shop worksheet – if a change is made to that value on the Luton shop worksheet, it will change here too. • Now copy the formula that you created for the Luton Shop January sales total across to February and March (cells C4 and D4). Relative addressing works in just the same way as it does with cells that are on the same worksheet – the formula adjusts the cell addresses to pick up the correct monthly totals. • Insert the totals for the Watford shop in the same way – create a formula that links with the Watford shop worksheet for January then copy the formula across for February and March. The grand totals can be completed using a simple formula (e.g. =B4+B5 for January, and so on). • The completed sheet should look like Figure 27.27. Figure 27.25: Total Sales worksheet Figure 27.26: Linking the worksheets Figure 27.27: The completed Total Sales sheet 25 BTEC’s own resources How to… Link spreadsheets using Paste Links Paste Link provides an alternative method for creating links between worksheets. • Click on the cell containing the formula you want to copy (e.g. B7 in the Luton worksheet) and choose Edit then Copy (or click the copy icon in the Ribbon). • Now go to the cell where you want the formula to be copied into (e.g. B4 in the Total Sales worksheet) and choose Edit then Paste Special. This will display the Paste Special dialog box. • Click the Paste Link button and the link formula will be inserted. However, note that the cell references have been made absolute, so the formulae cannot be copied as described above. So although Paste Link provides an easy way to create links between worksheets, in this example it would be easier to create the linking formulae manually. Macros Macros allow regularly used functions to be automated. A task that might take several keystrokes or menu selections can be simplified by creating a macro that carries out the task with a single mouse click. The subject of macros is covered in Unit 9: Customising software, pages 164–169. 2.6 Refining spreadsheet models Improving efficiency Excel® provides many shortcut key combinations to make it easy to move around large or multiple worksheets. Some of the more useful ones are listed in Table 27.4. Table 27.4: Commonly used shortcut keys Shortcut key Effect For moving around a worksheet Key term Data region – an area of cells that contains something and is surrounded by empty cells or the edge of the worksheet. 26 Ctrl + End Moves cell pointer to the last used cell in a worksheet (bottom-right cell) Ctrl + Home Moves cell pointer to cell A1 Home Moves cell pointer to the beginning (i.e. column A) of current row Page Down Moves one screen down Page Up Moves one screen up Selecting cells Ctrl + A Selects the current data region Ctrl Allows you to select non-adjacent areas (i.e. areas that are not next to each other) Unit 27 Spreadsheet modelling Table 27.4: Contd. Moving between worksheets Ctrl + Page Up Move to next worksheet Ctrl + Page Down Move to previous worksheet Formatting Ctrl + Shift + $ Applies currency format Ctrl + Shift + % Applies percentage format There are many more shortcut keys, but it can be difficult to remember them all unless you use them often. You can find out about them all by searching the Help menu in Excel®. 2.7 Combining information There are some situations when you will want to select information created in Excel® and insert it into another software package, such as a Word® document. For example, you may wish to do this if you need to produce a financial report. Simple copy and paste The simplest way to insert data into a Word® document is to copy the required cells from Excel® and paste the data into Word®. Once pasted into a Word® document, worksheet cells will become a Word® table and can be edited in the normal way. An example is shown in Figure 27.28, but as you can see, the columns of the table need widening to display the data on one line. Cells pasted in this way are no longer connected with the original spreadsheet. Figure 27.28: Excel® spreadsheet cells pasted into a Word® document 27 BTEC’s own resources Retaining a link to the original data It’s also possible for the pasted cells in the Word® document to remain linked with the original spreadsheet, so that changes made in the spreadsheet will be reflected in the pasted cells in the Word® document. How to… Retain a link to the original data Copy the cells from Excel® and switch to the Word® document. • Select the Home tab in the ribbon and click the arrow under the Paste icon. • From the menu that appears choose Paste Special. This will display the Paste Special dialog box (see Figure 27.29). Click the Paste Link button. • Select the document type Microsoft Office Excel Worksheet Object from the list box then click OK. • The cells will be inserted in the Word® document as before, but not as a Word® table. Rather, the cells behave as a graphic image. • To edit the cells, double click on them and the original spreadsheet will open up in Excel® but inside Word®. Figure 27.29: The Paste Special dialog box 2.8 File handling You must, of course, save the spreadsheet file you produce. Normally you will save the spreadsheet as an Excel® file, but in some situations you may want to export the file in an alternative format, for example to use the spreadsheet in a database or web page. Did you know? It’s not a good idea to use the default name such as Book1, as it tells you very little about what the spreadsheet contains. It is much better to think of a more descriptive name that gives some clue to the contents of the spreadsheet. For example, you might call a monthly budget spreadsheet Budget for Jan 11. How to… Save a spreadsheet file Save a file in Excel® by going to the Office menu and choosing Save. To save an existing file with a different name, choose Save As. Alternatively, you can use the Save button in the Quick Access toolbar. If the spreadsheet has not been previously saved, or you choose Save As, you will see the Save As dialog box. You will be offered a default file name such as Book1.xls. If you want a different format for your spreadsheet, you can select the format you want from the drop-down list from the Save as type box on the Save As dialog box. When you are creating lots of spreadsheets and other files, it’s a good idea to create a folder structure to keep related files together. 28 Unit 27 Spreadsheet modelling 2.9 Presenting data So far we’ve kept our spreadsheets fairly plain, but there are many options that allow us to format the data in a spreadsheet, thereby improving the way it is presented. Data types There are several different ways that numbers can be formatted in Excel®: • Default number format. This is the format you get when you enter plain numbers. • Comma format. This numeric format will add two digits after the decimal point and a comma after the thousands. There is a button on the Home tab to choose this format. • Currency. If you enter a number with a currency symbol (£ in the UK) before it, the currency format will automatically be applied. There is also a button in the Home tab to apply it. • Percentage. If you enter a number followed by a % sign, the percentage format will be applied. There is also a button in the Home tab to apply it. • Date. If you enter a number in a date format (such as 7/5/10 or 7-May-10), the date format will be applied. Figure 27.30 shows the same number (1234) formatted in different ways using the standard Home tab buttons. Note that the percentage format button multiplies a number by 100, so if you want, for example, 50% to be displayed, then you must enter 0.5. Figure 27.30: The number formats 29 BTEC’s own resources Date format is automatically set in a cell if you enter something that Excel® recognises as a date, such as 5/2/06 or 5-Feb-06. Deleting data If you delete the contents of a cell or cells that have been formatted (by selecting the cells with the current cell pointer and pressing Delete), you will delete what is in the cell but you will not remove the formatting. This can have some confusing results. For example, if you enter a date in a cell, the cell will automatically be formatted as a date. If you then delete the date but at some time later enter a simple number in the same cell, the number will be displayed as a date. If this happens, you can change the formatting using one of the format buttons in the toolbar. Alternatively, when you delete the date initially, use the Clear icon (a pencil eraser) on the Home tab and choose Clear all from the dropdown menu; this will remove both the contents and the formatting. Increase and Decrease decimal Also shown in Figure 27.30 are the Increase decimal and Decrease decimal buttons (next to the number format buttons). These allow you to control the number of digits displayed after the decimal point. Activity: Experimenting with number formats You can set many other number formats, as well as different versions of the formats already described. • On the Home tab, click the menu launcher button at the bottom right of the Number section. This brings the Format cells dialog box on to the screen. • The Number tab allows you to choose the different formats for numbers. Have a look at this dialog box and experiment with the different formats. If there are any that you don’t understand, or that you want more information about, search under help for ‘number formats’. • If you want a real challenge, consider a mythical currency called the ‘Zap’. This has a rather strange format: the currency symbol is a capital Z and it has three digits after the decimal point (there are 1000 pennies in a Zap). The pennies are always preceded by a letter p, so 25 Zap and 75 pennies would be written Z25.p075. Create a custom number format for the Zap currency. Formatting cells Excel® has a full range of facilities to control the way information is displayed, including being able to modify the font, size, attributes (bold, italics, underline) and alignment (within the cell). As with the number formats, you can set many of these using the icons in the Home tab, but you can find the full range of options by clicking the menu button on the bottom right of each section. 30 Unit 27 Spreadsheet modelling Some of the formats are worth mentioning in more detail: • Colours. You can set both the background colour of the cell and the colour of its contents. The background colour button in the Font section of the Home tab is a drop-down button called Fill Color. When you click on it, it displays a choice of different colours. • Borders. It’s often useful to add borders to your spreadsheet, to highlight important information such as totals and to separate data into different sections. The Borders button is also a dropdown button. It displays diagrams showing how the borders will be applied to the currently selected cell or cells. • Alignment. By default, numbers are aligned to the right of a cell and text to the left, but you can change this alignment using the buttons in the toolbar. If you click the menu launcher button at the bottom of the Alignment section of the Home tab (see Figure 27.31) you will find some useful additional options you can set. Figure 27.31: The Alignment tab of the Format Cells dialog box You can set the vertical alignment in rows for text to be displayed at the top, bottom or centre. You can also set the orientation of text so that you can, for example, have text rotated through 90 degrees (i.e. on its side). The Text control check boxes allow you to set the following options: • Wrap text. Text wraps within the cell (as it does in a text box). • Shrink to fit. The font size is automatically reduced so that text fits in the cell. Without this option, when there is too much text to fit in the cell, it will overflow across other cells. • Merge cells. This allows several cells to be merged so that they are treated as one cell. This option can be useful if you want to enter a lot of text, especially if combined with Text Wrap. 31 BTEC’s own resources There is a wide range of formatting options available. Make sure that you use these options to improve the readability and appearance of your spreadsheets. However, don’t overuse them or your spreadsheets will look garish and unprofessional. Also, make sure you use formatting in a consistent way, otherwise your spreadsheets will look messy. Formatting sheets Unlike a word-processing program, Excel® does not display the spreadsheet as it will look when printed. You need to check this and, if necessary, adjust various settings, such as the position of page breaks and the page orientation. To check the way the spreadsheet will look when printed, click the Page Layout button in the View tab on the Ribbon. You will then see a display similar to Figure 27.32. Figure 27.32: Page Layout view Page settings On a spreadsheet larger than a single page of paper, you can use the Page Setup dialog box to make sure that there are no page breaks in awkward places. There are several ways of doing this: • adjust the margins so that the spreadsheet fits on a single sheet of paper • adjust the page orientation to portrait or landscape • scale the spreadsheet so it fits on one page • adjust the position of the page breaks. You can display the Page Setup dialog box by clicking the menu button at the bottom right of the Page Setup section of the Page Layout tab. 32 Unit 27 Spreadsheet modelling Adjust the margins If the spreadsheet is slightly larger than one page, but not much bigger than that, you can adjust the margins so that it fits onto one page. Click the Margins button on the Page Layout tab of the Ribbon. This will display a series of pre-set margin options. Alternatively, you can click Custom Margins at the bottom of the menu to display the Margins tab of the Page Setup dialog box, shown in Figure 27.33. Figure 27.33: The Page Setup dialog box Adjust the page orientation In some cases, adjusting the page orientation will enable a spreadsheet to fit on a single sheet. You will need to adjust the page orientation in any case to suit the layout of the spreadsheet. For example, if it has more columns than rows, it will print better in landscape. Select the Page tab of the Page Setup dialog box and then set the orientation. Scale the spreadsheet Scaling the spreadsheet means making it smaller or larger so it fits on a single sheet of paper. This only works if the spreadsheet is only slightly larger than one page, otherwise the text can get too small. On the Page tab of the Page Setup dialog box, you can choose to scale to a fixed percentage or to fit on a certain number of pages (Excel® works out the percentage scaling for you). Adjust the position of the page breaks You can move the page breaks so they occur in more convenient places (e.g. not right in the middle of a set of data). The Page Layout view allows you to see where the page breaks fall in your document. 33 BTEC’s own resources (Remember that you can swap between Page Layout and Normal view using the icons on the Page Layout tab of the Ribbon.) By clicking the Page Break Preview icon (next to the Page Layout icon), you can drag them to the positions you want with your mouse. If you drag the page breaks to the right or down, more information will have to fit on a page, and the spreadsheet will automatically scale the information to allow this. (See Figure 27.34.) Figure 27.34: Page break preview Header and footer You can use the Header/Footer tab of the Page Setup dialog box to choose from a selection of preset header and footer entries or you can enter your own custom information. There are various buttons that allow you to add page numbers and dates, etc., and format them, as shown in Figure 27.35. Figure 27.35: The Header/Footer dialog box 34 Unit 27 Spreadsheet modelling Sheet The Sheet tab of the Page Setup dialog box offers several options for printing: • Gridlines – the lines separating rows and columns will appear in print. • Row and column headings – the numbers of the rows and letters of the columns will appear in print • Page order – you can select the order in which the pages of data will be printed, as indicated by the pictures within the dialog box. If you don’t want to print the whole spreadsheet, you can set a print area. First select the area of the spreadsheet you want to print then click the Print Area icon in the Page Layout section of the Page Layout tab in the Ribbon. Assessment activity 27.2 P3 P4 P5 D1 The university where you work as a trainee IT support specialist has asked you to produce an automated class register using a spreadsheet. It should be formatted in a similar way to a paperbased class register, with learner names down the side and the date of each class across the top. P3 , P4 In addition to the things you would normally expect to find on a paper-based register, the spreadsheet version should display percentage attendance rates for each learner as the lessons progress. The spreadsheet should also display a warning if any learner’s attendance falls below 80 per cent. P5 Once you have completed the spreadsheet, write an evaluation of it suggesting further improvements that could be made. D1 Grading tips PLTS Producing the register spreadsheet will provide evidence that you are an independent enquirer and a creative thinker. The evaluation you write for D1 will provide evidence that you are a reflective learner. Functional skills The spreadsheet you produce may provide evidence for your Functional Maths skills. •To achieve D1 you will have to consider how well your register spreadsheet meets the user’s need. You might find it helpful to show it to a tutor and ask them how well they think it would work as a class register, what’s good about it and what could be better. Remember that when you suggest further improvements you don’t actually have to do the improvements, but you should explain how they will make the spreadsheet better. 35 BTEC’s own resources 2.10 Analysing and interpreting data Excel® includes some tools to help you analyse and interpret the data in a spreadsheet. These tools can be particularly helpful when making sense of large amounts of data. Charts and graphs One of the best ways to present data in an accessible format is to display it as a graph or chart. Creating charts in Excel® is quite easy, although you need to be careful to make sure that the correct data is included. How to... Create a chart using the chart wizard To create a chart you use the Charts section on the Insert tab of the Ribbon. The chart buttons work best with blocks of data that have titles along the top and down the left-hand side. Figure 27.36 shows an example of this layout. Before you click the Chart icon you should select all the data including the titles then click the type of chart you want (in this case a column chart) and the subtype (2D column shown below). Figure 27.36: Creating a chart Selecting an appropriate type of chart The type of chart you need to choose partly depends on the data you have. 36 • Line and area charts have data points that are joined up, so should be used for data that represents a continuous change, such as temperature over time. • Column or bar charts are better for financial data, such as the data in Figure 27.36. Unit 27 Spreadsheet modelling • Pie charts are good at representing proportions, such as the percentage of people who voted for each party at an election. A single pie chart cannot show multiple sets of data, as appears in Figure 27.36. (We would need separate charts for North, South, East and West regions.) • Choice of 2D or 3D is really personal preference, but 3D charts can be hard to read accurately. It may be that the standard chart Excel® produces is not quite what you want. In that case, you can modify most aspects of the chart. You can also resize your chart by dragging on the handles at the sides of the chart. Be aware that if your chart is too small, the titles may not display properly. Key terms x-axis – the scale or items that run along the bottom of the chart. y-axis – the scale that runs up the side of the chart. How to… Modify a chart Once you have created a chart, or selected an existing one, the Chart Tools set of tabs will be added to the Ribbon. In the Design tab you can do a number of things such as: • change the chart type • change the title of the chart or the labels for the x and y axis • change the colour scheme of the chart (the Chart Styles section provides a scrolling list of many different colours and effects). to change. For example, you might want to change the scale of the x-axis or y-axis of the chart. First click on the axis to select it, then right click and choose Format Axis. This will display the Format Axis dialog box, as shown in Figure 27.37. In the example shown in Figure 27.37, the minimum value on the y-axis has been changed to 2000 and the major units indicated on the axis have been set to an interval of 2000. You can see the result on the chart itself. To select the data to use for the chart, the Select Data icon in the Data section allows you to choose the cells to include or exclude from your chart. This is useful if the data has an empty row or column in it, or if you want to leave out one of the rows or columns of data. To choose a different chart layout, the Chart Layouts section provides a scrolling list of different layouts. For example, the standard chart does not have a title but you can choose a layout with a title from this list. This will insert the text Chart Title in your chart, but you can click in this and type your own title. Some of the chart layouts let you add titles to the axis as well. As well as using the Chart tools to modify your chart, you can also click on the part of the actual chart you want Figure 27.37: The Format Axis dialog box Filtering and sorting lists Dealing with lists and simple databases is one of the many strengths of Excel®. People often use Excel® to keep track of lists, rather than using a database product such as Microsoft® Access®, because it is easier to understand and set up. In fact, all you really need to do to set up a list in Excel® is add field titles at the top. 37 BTEC’s own resources Figure 27.38 shows a version of the Games Store spreadsheet we used before. We will use it to look at how lists can be filtered and sorted. Every column of data has a title (or ‘fieldname’ in database terminology). Columns for the types of game and the hardware platform have been added. Figure 27.38: The Games Store games list How to… Sort lists There are various reasons why people want to sorts list – to find the cheapest, the newest, the best selling and so on. To sort a list, all you need to do is make sure the current cell pointer is somewhere in the column you want to sort, then, from the Home tab click Sort and Filter and chose AZ or ZA (this works with both alphabetic and numeric data). Excel® will then sort the whole table of data. Figure 27.39 shows the games sorted in ascending order by price (cheapest first). Figure 27.39: Games sorted by price Filtering is more sophisticated than sorting, as it lets you pick out a record or records in the list that match certain criteria. 38 Unit 27 Spreadsheet modelling How to… Filter data box in the Platform column now has a little filter icon in it, indicating that the field has a filter applied. As long as you have field titles in the first row of your list, you can use the data filter. • Make sure the cell pointer is somewhere in the list of data and then choose Filter from the Sort and Filter drop-down menu. This will display a little drop-down arrow beside each of the fieldnames in the top row of the list, as shown in Figure 27.40. • If you only want to display the Xbox games, click on the arrow next to the Platform title and remove the tick next to PS3 in the Text Filter area at the bottom of the menu, so only Xbox has the tick next to it (see Figure 27.40). • Now click OK at the bottom of the menu and the filter is applied (see Figure 27.41). The drop-down • To return to the display of all the data, click the Filter icon again and the Select All option. Then click OK. • You can apply more sophisticated filters if you wish. For example, you might want to list all the games with a price of less than £30. To do this, click the Filter icon next to the Price fieldname, then choose the Numbers filters option and the Less than option. The Custom Filter dialog box shown in Figure 27.42 will appear. • Enter 30 in the box on the right (see Figure 27.42) and click OK to apply the filter. Your list will now display only games under £30, as shown in Figure 27.43. Figure 27.42: Custom Filter dialog box Figure 27.40: Filtering a list Figure 27.41: A filter applied Figure 27.43: Games under £30 39 BTEC’s own resources PLTS Justifying the use of a chart will demonstrate that you are a reflective learner. Analysing the attendance data will demonstrate that you are an independent enquirer. Functional skills Writing reports for these assessment tasks will provide evidence for your Functional English skills in writing. Analysing large and complex spreadsheets When you are trying to analyse data from large and complex spreadsheets, you may make more sense of the figures if you restrict your analysis to just the totals or subtotals. Although sorting and drawing charts make interpreting data easier, if there is a very large amount of data in the first place, then the resulting chart, sort or search may not make much sense. For example, if you draw a bar chart from a very large amount of data, then the resulting chart will have so many bars it will be difficult to read. In this situation it may be better to create subtotals based on a date or month range and then graph this data. The resulting chart will be much smaller and, therefore, easier to read and interpret. Just checking 1. If a cell contains the number 10, and you use the percentage format button in the toolbar to format the cell, what will be displayed? 2. Your spreadsheet is slightly larger than a single sheet of paper. How can you make it print on just one sheet? 3. How can you select non-adjacent cells (i.e. cells that are not all together in one block)? 4. What must you do before you use the Filter menu option? 5. Where is the x-axis on a graph – along the bottom or up the side? Assessment activity 27.3 You have been asked to further refine the register spreadsheet you produced earlier. 1.Add some example data to your spreadsheet and create appropriate charts showing the learners’ attendance percentage figures and the total class attendance each week over the weeks of the course. P6 2.Write a justification for using a chart to present the learner attendance figures and for the type of chart you chose. M2 3.The spreadsheet currently displays a warning if a learner’s attendance falls below 80 per cent. Add a facility to your spreadsheet so that the user can change this percentage. Test your spreadsheet with different percentages and check that the warning messages work correctly. M1 40 P6 M1 M2 M3 4.Write a report for the Head of Department analysing the attendance data, identifying overall trends for the whole class and for individual learners. M3 Grading tips • It may be best to ask your tutor to provide some real attendance data for question 4. Just using random data will not make analysis easy. •When writing your report for question 4, you might comment that over the weeks of the course the overall attendance has improved. For individual learners their overall attendance might have improved or got worse over the course, or there may have been several weeks when they did not attend due to illness. Include the chart you have created in the report. Unit 27 Spreadsheet modelling 3. Be able to test and document spreadsheet models 3.1 Test It’s very easy to assume that, because a computer is doing the calculations, they must be correct. However, the computer only does what you tell it to do, so you must be careful that the formulae you enter are correct. If not, the calculations will be done correctly but they will be the wrong calculations! To make sure your formulae are correct, you need to check them manually with a calculator. Where your spreadsheet contains automations such as macros or links to other spreadsheets you will need to check these work correctly. You should also check that the formatting and layout of the spreadsheet is neat and consistent. As well as checking that your spreadsheet works correctly, you also need to check that it meets the requirements of the users you produced it for. You can do this by revisiting the design document you originally produced, which defines what the spreadsheet should do. Check to make sure your spreadsheet does what you said it would do and you haven’t forgotten anything. 3.2 Documentation Documentation is an important part of any solution. Producing a working solution without documentation will lead to problems later. The user guide you produce should provide all the required information that your users will need to make use of the spreadsheet model. You should already be aware of how the users will want to use what you have produced, and your documentation should guide them step-by-step through that process. You will need to add a troubleshooting section to your documentation which explains how to deal with common problems. As part of developing your documentation, you might find it useful to show your spreadsheet model to someone who has not seen it before. Ask them to try to use it following your step-by-step instructions. See what problems they have and what questions they come up with. 41 BTEC’s own resources Functional skills Producing user documentation for your spreadsheet will provide evidence for your Functional English skills in writing. Assessment activity 27.4 P7 P8 D2 1.Create another worksheet in your class register spreadsheet which contains the register for another class. Add some example data for this register. Then create a third worksheet in your class register which will be used as a management summary of the attendance data from the other two sheets. The management summary sheet should only show the overall learner attendance percentages, not the attendance figures for each class. D2 2.To make a new register for a class it is necessary to copy a blank register (with no attendance data in it) to a new worksheet. Record a macro for your class register spreadsheet which will do this task for you. D2 3.Test your class register to ensure it works correctly and calculates learner attendance percentages correctly. P7 4.Produce user documentation for your register spreadsheet which explains how to use it. P8 . Grading tips As you are a learner, you will probably not have real end users for your class register. But you should consider asking your tutor or fellow learners to review what you have done and compare it to your design. Doing this will help you to ensure that your work meets the pass grade requirements (‘test a spreadsheet to ensure that it is fit for purpose’). It may also provide some evidence for a distinction (‘evaluate a spreadsheet model suggesting further refinements’). 42 e c a p S k r o W Simon Osoba Unit 27 Spreadsheet modelling BTEC’s own resources Junior Technician in an IT support department I use spreadsheets frequently in my work. Most of the time I just use them to manage lists of data. For example, I keep a spreadsheet of all the computers we have and the software that is installed on them so we can check licensing. When we buy new equipment we often create a spreadsheet to compare different options. We put all the different prices in and then play around with the quantities, suppliers and things like cheaper or more expensive items, to see how this changes the total cost. I have recently been working on a user satisfaction survey. We do this every year to check how good a job the users think we are doing. I was asked to create a spreadsheet that we could put all the results in and analyse them. The IT director wanted charts showing the results for every question on the survey. I also had to link this year’s spreadsheet with the results from last year, so she could compare the two and see where we are getting better and where we are getting worse. I quite enjoy using spreadsheets – there is so much they can do and there is always something new to learn. Think about it! 1. What spreadsheet skills will Simon need to use to produce the spreadsheet he mentions above? 2. What could spreadsheet models be used for in your school or college? Think of four or five different uses. 3. What about in business? Think about how spreadsheets could be used in a small company such as a shop. 43 BTEC’s own resources Just checking 1. What are the different sorts of ways in which a spreadsheet can be used? 2. What are the formats in which you can save a spreadsheet? Why might you want to use these different formats? 3. Explain the difference between relative cell referencing and absolute cell referencing 4. List four useful spreadsheet functions and explain what they do. 5. Explain how ‘AND’ and ‘OR’ logical operators can be used in an ‘If’ function. 6. Explain what a macro is and how you can create one. 7. What are the main data types you can use to format numbers in a spreadsheet? 8. What are the main types of chart you can use and what sort of data is each type best at displaying? 9. Why is it important to test a spreadsheet? Assignment tips • This unit links with Unit 9: Customising software. Both units require you to produce a macro, so you can cover both requirements with the macro you create in this unit. • Remember that this unit is not just about spreadsheets – it is also about spreadsheet models, so the spreadsheet you develop for assessment must have an aspect of modelling to it. Your spreadsheet needs to have rules (based on formulae) which can be changed so you can see the effects. 44