Year 10 Introduction to Spreadsheets General Information Cells A spreadsheet is like a large grid or table of cells. A cell is found at the intersection of each row and column, and is referred to (usually) by its column letter and row number. For example the top left cell is Al. Columns are given a letter of the alphabet. After Z the next column is AA, then AB etc. and Excel allows columns up to IV, giving 256 columns. Rows are numbered from top to bottom, and Excel has 65,536 rows. This means there are 16,777,216 cells that could be used, but this is restricted by the practicality of finding your way around the spreadsheet, and by the available RAM (internal computer memory). Cells can contain three different types of entries. * Text * Numbers * Formulae Text and Numbers Text and Numbers can be Formatted in a number of ways e.g. font (letter style), size, style (bold, italic, etc) and alignment (where it is placed within the cell). In addition some numbers can be formatted to give some meaning to the number (e.g. $, %, time, date etc). Formulae Formulae are one of the most important aspects of a neat and correctly working spreadsheet. Very useful and powerful spreadsheets often use only very simple formulae. Using formulae instead of using numbers, a spreadsheet can be made to answer a lot of what if’s by changing only a few key entries. Formulae normally only show while they are being entered or in the edit bar when the cell is selected. The result of the formula is shown instead. With simple formula the result is a number, the appearance of which can be formatted like any other directly entered number. More sophisticated formula can show text as a result. All the formulae in a spreadsheet can be shown, and printed by changing the options in Options/Display, so that the "Formulas" box has a cross in it. Excel will automatically widen columns when displaying formulae. FORMULAE ALWAYS START WITH AN = SIGN. Without it the contents of the cell are treated as text. If the = sign is forgotten select the cell click at the beginning of the entry in the edit bar, insert the = sign, and press <Enter>. For the standard calculations required the spreadsheet uses: = to start the formula (the spreadsheet will show the result of the following material) + plus (add) minus (take) * multiply, (note that X will not work!) / divide (the sign is not used) () brackets are often required so that certain parts of the formulae are calculated first. Brackets can be used even when not strictly required, but to help the user to understand the formula. Formulae often use Functions. Commonly used functions are SUM, AVERAGE, MAX (maximum) and MIN, (minimum). Functions normally require a range of cells to be entered, e.g. to add up the contents of cells C3 down to C13 the formula/function =SUM(C3:C13) would be entered. When entering cell references it is important to make sure that the cell you are entering the formula into is itself not included as part of the formula. The spreadsheet will give the message that it cannot resolve circular differences. When entering a cell reference, if the formula is likely to be copied, or used to "Fill down/Fill right", it is important to work out whether relative (e.g. =Al) or absolute (e.g. =$A$1) referencing is used. Note: Most of the techniques and menus you used in the Wordprocessing exercises are applicable to spreadsheets as well. Hence, to highlight cells, simply drag the mouse over them, to copy information from one cell to another, go to the Edit Menu and select Copy etc. RELATIVE ADDRESSING A relative reference gives general directions to the spreadsheet rather than a specific location. It's like saying, "Go up two blocks and over one". If you copy a relative reference to another cell, the reference changes relative to its new position. For example if a relative reference points two rows up and one column to the right, and you copy the formula to another location, it still points two rows up and one column to the fight, but it points to a different cell than it did originally. A B C 1 2 3 Original 4 Copy What does the above do? Formulae Open the file INTRODUCTION TO SPREADSHEETS\FORMULAE.XLS that you will find in the directory. Complete the following operations on the spreadsheet. a) Set the margins to l cm. This should be standard practice on all spreadsheets. b) Enter formulae into cells B6 to E6. In cell B6 follow this procedure i) type =SUM( ii) highlight cells A2 to F2 iii) and press the Enter key, the ) will automatically be included. The formula =SUM(A2:F2) should now appear in the input line and 192 should be in cell B6. c) In a similar way, put the formulae =AVERAGE(A2:F2) into cell C6, =MAX(A2:F2) in D6 and =MIN(A2:F2) in E6. d) Now copy cells B6 to E6 into cells B7 to E7 by i) highlighting cells B6 to E6 ii) press the copy button on the tool bar iii) put your cursor onto B7 and press Enter. What do you notice has happened to the formulae as you have copied them to the new cells? c) Enter your name into cell A9 and print out your spreadsheet. Electricity Open the file INTRODUCTION TO SPREADSHEETS\ELECTRIC.XLS that you will find in the directory. Complete the following operations on the spreadsheet. a) Set the margins to 1 cm. (Use File Page Setup). b) Enter appropriate formulae in the empty cells and Fill them into the other cells, thus keeping the amount of typing to a minimum. c) Format the cells to Currency with no decimal points, and the cells in row 11 to be Right Justified. d) Add your name to the bottom of the spreadsheet and print it out. Cricket Open the file INTRODUCTION TO SPREADSHEETS\CRICKET.XLS that you will find in the directory. Complete the following operations on the spreadsheet. a) Set the margins to 1 cm. b) Set the column width for the scores that have been entered to 4 (Select the Format Menu and Column Width) and the column width for the other columns to 5. c) Highlight "Total, Ave, High, Low" and make them bold. d) Put formulae into the cells H3 to K3, and fill them down to H13 to K13 (highlight the block of cells from H3 to K13 and then grab the dot on the bottom corner of the cursor). c) Put formula into cell B14 and fill it across to G14. f) Add your name to the bottom of the spreadsheet and print it out. Hardware Open the file INTRODUCTION TO SPREADSHEETS\HARDWARE.XLS that you will find in the directory. Complete the following operations on the spreadsheet. a) Set the margins to 1 cm and remove the footer. b) Adjust the column widths so that all the information fits in them. c) Put today's date into cell B4 in the form 3/8 and format the cell to show it as 3 August (Format menu/Time date). d) Format cell A15 to percentage with 0 decimal places. c) Add formulae to cell D7 and fill down. Now add formulae to D14, D15 and D17. f) Format the cells with money in them to Currency, underline cell D12 and D17, and make the headings in row 6 bold and centred in the cells. g) Add your name to the bottom of the spreadsheet and print it out. A pack of flies The Department of Tourism set up 100 fly monitoring stations in some of the outback tourist attractions to see what effect the number of flies had on the number of tourists that visited that location. The readings in this file represent the average over the 100 stations of sightings of flies in different resorts of the state during months of 1998 and 1999. 1. Open the file INTRODUCTION TO SPREADSHEETS \PACK OF FLIES.XLS and set the margins to 1 cm. 2. Move the table of information across 10 columns. To do this, highlight the block of information, select Cut from the Edit menu, place your cursor into cell K1 and press Enter (Can you do it another way? Is it easier? What can go wrong?). 3. Copy the "Week" titles across the top of the columns into B3 to F3 and add another heading "Month Totals" into G3. Also copy the "Month" titles into cells A4 to A27. Make these headings bold and add a title to your spreadsheet "Statistics for fly populations of South Australia: 1998 and 1999" in cell A1. 4. In the new area you have just created, you are to put values that are 100 times as large as those in the table you have moved. To do this, type in the formula into cell B4 and then Fill Right and Fill Down to put formula into all the other cells. 5. Put a heading in G3 of Month Totals and put in the formulae to calculate them. 6. In A29, A30 etc, put headings Weekly Statistics, Average, Maximum and Minimum. Put formulae into the cells next to Average, Maximum and Minimum to do the appropriate calculations for each week. 7. Put your name into cell A33. 8. Highlight the cells from A1 to G33 and choose "Select Print Area" from the Print menu. Print out the selected part of the spreadsheet. Test your Skills Open the file INTRODUCTION TO SPREADSHEETS\OPSKILLS.XLS, set margins to 1 cm. Follow the instructions in the spreadsheet and print out the spreadsheet after you have added your name to the bottom. Getting a Head The "Blow Wave" hairdressing salon ran a competition between its hairstylists to increase its profits and to encourage them to give better service to the clients. This spreadsheet contains the number of clients that each hairstylist served each week in a 20-week competition. You will need to use some of the techniques that you learned in the previous exercise to complete this assignment. 1. Open INTRODUCTION TO SPREADSHEETS\GETTING AHEAD.XLS and set the margins to 1 cm. 2. Move the information stored in the spreadsheet out of the way so that you have room to do the rest of the tasks. 3. Put a heading into cell A1 "Earnings of Hairstylists" and copy the headings for the rows and columns from the table you have just moved. 4. If the hairstylists are paid $2·75 per client, fill in the amount each person earned for each of the weeks in the competition. Display the weekly income to the nearest dollar. Reduce the width of the columns so that the information Just fits in. 5. At the bottom of the earnings table, add the headings Statistics for each hairstylist, Ave Income, Max Income and Min Income. Include formulae to calculate these. 6. 7. Below these statistics, show the following information in this form ..... total wage bill ..... total clients ..... average number of clients per week ..... maximum number of clients In one week ..... minimum number of clients in one week Note: you may have to make column A wider to fit in the information. Add your name at the bottom and print out only the earnings information and the statistics that you have added below them. HINT: Set the print area to cover just this information. Personal Timetable You are to complete a personal timetable for the current month, with your subjects for each day, the date of each day and the month for which the timetable has been created. In its preparation, you should use formulae as much as possible, and copy parts of the spreadsheet, rather than typing the same thing over and over again. The dates must be entered as dates, and not typed in as strings. Remember the technique you used in making the calendar, and that will help you insert the dates in the school timetable. The first week of the timetable should look like this April, 2000 Week Monday April 3 2 Tuesday April 4 1 2 etc. 6 Wednesday April 5 English Maths Thursday April 6 Computing German Friday April 7 Maths Art Economics English Phys Ed Once you have completed the timetable for the first week, copy it several times underneath itself so that you have enough copies for the weeks of the month. Modify each of the new weekly timetables so that they are correct for that week. Don't forget to take account of the holidays. You could perhaps put "HOLIDAY" in these days. Adventurers Ltd: Adventurers Ltd is an exclusive agency from which various heroes, adventurers and agents can be hired. In an effort to improve both record keeping and confidentiality, computers have been installed in the organisation. Your first job on the computer is to enter payroll details. Enter the names of each adventurer and headings for the payroll data form. ADVENTURER James Bond Indiana Jones Maxwell Smart Mick Dundee Simon Templer Batman Steve Austin John Rambo Clark Kent HOURLY RATE HOURS WORKED $200 $95 $86 $54 $100 $40 $50 $180 $100 100 50 99 40 60 100 10 125 80 ORDINARY PAY OVERTIME HOURS 20 10 5 5 40 20 0 0 4 OVERTIME PAY GROSS PAY Overtime is calculated at 1·5 times the normal hourly rate. Enter formulae into the cells of the spreadsheet to calculate the Ordinary Pay, Overtime Pay and Gross Pay, filling down to complete the table. Enter the deductions to be made from each adventurer in the column after "Gross Pay". Call the column DEDUCTIONS. Format the column to currency with two decimal places. Deductions are ... Bond $68, Jones $12·50, Smart $43, Dundee $25·96, Templer $36, Batman $15, Austin $9·48, Rambo $90, Kent $45·13. Enter in the next column, a heading NET PAY. Format the column to currency with two decimal places and enter an appropriate formula. Enter a main heading in rows 1, 2 and 3. ADVENTURERS LTD PAYROLL, DATA WEEK 1, 2000. Reduce the margins and the font size, and print it out. Don't forget your name. Bacterial Growth Scientists have studied a certain colony of bacteria and would like you to simulate its growth over a 24-hour period, by calculating the size of the population each hour. The following columns are to be set up, and the numbers that appear in the table are the only ones that you are to put into the spreadsheet. All other cells must have formulae in them. 1 2 3 4 A Time B Temp 0:00 10 C Percent Increase D Number at Start 100 E Number at End F Increase NOTE: Format Column A as time (12 hours) and Column C as percent (2 decimal places) and Columns D to F as fixed (2 decimal places) Formulae in column A =cell above + 1/24 column B =cell above column C =temp* (40 - temp) / 4000 column D =Number at End from the row above column E =Number at Start* (1 + Percentage Increase) column F = Number at End - Number at Start These formulas should be filled down so that a full 24 hours is covered. ABSOLUTE ADDRESSING An absolute address is like a mailing address. No matter where you copy the reference to, it still points to the same cell. For example, an absolute reference to cell B1 in the above diagram always points to B1, even if the formula containing the reference is copied to another location in the spreadsheet. Excel uses dollar signs to indicate that a row (e.g. A$1), a column (e.g. $Al) or a cell (e.g. $A$1) is absolute. In the spreadsheets we have constructed up to date, when we copied formulae into other cells, the cell references changed as the formulae went from one cell to another. In many applications, this is what is wanted. This form of cell referencing is called Relative Addressing. However, there are occasions when we wish to refer to the same cell in the new formulae. If for example, you wish to use the value in cell D3 when you copied a formula from one cell to another, we would type the cell reference in as $D$3. This means that neither the column nor the row will change as the formula is copied. This is called Absolute Addressing. If you want the row only to remain constant and the column reference can change, you would use D$3, and for the column to be invariant, while the row may change, $D3 would be used. To see how this works, try some of the following examples. Multiplication Tables 1. Put the number 2 in cell A1 and 1 in Cl. 2. Put formulae in cells C2 to C15 to generate numbers 2 to 15 in these cells. 3. Put "x" in D1 and "=" in F1 and fill these columns down to row 15. 4. Put the formula =$A$1 in cell El and fill down to El5. 5. Put the formula =$A$1*Cl in GI and fill the formula down to G15. 6. Try changing the number in cell AI and see what happens to the rest of the spreadsheet. Markup & Discount In the formulae you have used to date, when you have Filled Down, the cell addresses have changed (e.g. in =A3+2, A3 changes from A3 to A4 to A5 to ... etc). This is called "Relative Addressing". In some applications, we want the cell address to remain the same as we copy the formulae to other cells. To achieve this, we would use =A3*$B$1. A3 would change, but each copied formula would still refer to B1. With this in mind, complete this table, formatting the appropriate cells. , 1 2 3 4 5 6 7 8 9 A Markup Commission Discount B 130% $15.00 10% Item Bed Table Rug Chair Cost Price $140.00 $563.00 $132.00 $56.00 C Selling Price D Profit E % Profit Note: Selling price is the Cost Price + Markup * Cost Price Profit is Selling Price - Commission- Cost Price % Profit is profit / cost price, formatted to percentage. Questions: Put the answers to these questions at the bottom of the spreadsheet, along with your name, and print it out when you have answered all the questions. a) Add another item under Chair, and find the smallest Cost price that would give you a $10 profit. Hint: Experiment by putting different values for the cost price until the profit is $10. b) What happens to your answer if you change i) the Markup to 110%. ii) the Markup is still 130% but the commission is $30. c) During a sale, the Selling Price formula must be changed to (Cost Price + Markup * Cost Price) * (1 - Discount). Using only the items above, and the original Markup and Commission, what is the largest discount and still make a profit of at least $20 on all the items listed. Write the answers to the questions at the bottom of your spreadsheet before you print it out. Fencing Load the file FENCING.xls from INTRODUCTION TO SPREADSHEETS. Use the information below to construct a spreadsheet that will allow you to complete the questions. It must be made so that the cost per metre of fencing can easily be changed. Paddock 1 2 3 4 Length 200 75 135 900 Fencing Cost Breadth 50 98 400 700 $7·50 Area Perimeter Fence cost Efficiency Note: The cost per metre of fencing is initially $7·50. Area is length Breadth. Perimeter is 2 * (length + Breadth). Fence cost is perimeter * cost per metre. Efficiency is area / fence cost. Questions a) The cost of fencing increases to $8.25 per metre. What is the increase cost of fencing paddock 3? b) A farmer has a paddock that has an area of 360000 sq m. By considering paddocks with lengths of 100, 200, 300, 400, 600, 800, 900m, find the shape that proves to be most efficient for fencing, i.e. the biggest efficiency. Hint: If you put these figures into row 7 of the table above, put the formula =36000/B7 into cell C7, once you have entered a number into B7. Fill the other formulae down to this new row. Write the answers to the questions at the bottom of your spreadsheet before you print it out. Times Tables Revisited You are to produce a spreadsheet that can print out any times tables from any starting point. As an example, if we want the 3 times tables, starting from 20, and going to 29, you would only change the two numbers that are highlighted, and the rest of the spreadsheet would change. 1 2 3 4 11 A 3 B times tables from C 20 3 3 3 3 D to etc E 29 20 21 22 29 F = = = = = = G 60 63 66 87 Note: The following spreadsheets need to be completed and printed out. They will be used in your assessment, so they need to be completed. Virus Populations In this spreadsheet, you will set up two parts of your spreadsheet. One is the area where you enter the data and the final results are seen. The other is where all the calculations are done. Splitting the spreadsheet up in this way makes it easier to read, as you don't have to hunt around for the results you want to see. Copy the spreadsheet below and complete the following operations. a) format column F to Time/Date and time to 24 hours and column G to Fixed 0 decimal places. Cell B5 also needs to be Fixed to 0 decimal places. b) put the formula =cell above + 1/24 into cell F4 and copy this formula down to F15. What does this formula do? c) using absolute addressing for all but time, put the formula below in cell G3 =initial number * (temperature + 10) * (50 - temperature) * increase % * time and fill it down to G15. d) Put the formula =G15 into cell B5. 1 2 3 4 5 e) f) A B Virus Population Study Initial Number 100 Temperature 10 Increase % 5% Final Number C D E F G Time 0:00 &&&& Number #### Using the numbers given above, use this spreadsheet to record the temperatures and final numbers of bacteria for temperatures from –10°C to 50°C. Do this in your book, as we will use these figures in an exercise later on. Does this simulation make sense for temperatures outside this range? Why? Starting with 1000 viruses and optimum temperature conditions, what percentage increase is needed to reach 1,000,000 viruses by the end of the experiment? Write the answers to the questions at the bottom of your spreadsheet before you print it out. Hills Industries Load the spreadsheet HILLS.XLS from INTRODUCTION TO SPREADSHEETS. a) Put a formula in cell D9 to calculate the total wage for each employee. The formula is Hours Worked * Hourly Rate. b) Put the formula into E9 to calculate the tax that each employee needs to pay. The formula is Tax * Gross Pay. c) The Union Fee is calculated as the Gross Pay * Union Fee. This goes in F9. d) The Net Pay in G9 is Gross Pay - Tax - Union Fee for each employee. Discounts Load the spreadsheet DISCOUNTS.xls from INTRODUCTION TO SPREADSHEETS and complete the table to find the total cost of each item, the discount that would be given and the selling price for the items. You will have to format the cells to Currency and 2 decimal places. Don't forget to use absolute addressing when you access the discount in cell B1. 1 2 3 4 5 6 7 8 9 A Discount Item coat skirt jeans belt jacket shoes B C D E F 15% Marked Number Total Price $253.90 2 $79.99 3 $56.50 5 $23.90 1 $178.95 4 $105.99 20 Discount Sells for Notice what happens when you change the discount to 10% and then 25%. Magazine Sales Load the spreadsheet MAGAZINE.XLS from SPREADSHEETS and put formulae into the cells to calculate the total sales figures for each employee and the weekly figures for the company. If the company wanted to increase the commission it paid its sales force to 25%, what would have to be the annual subscription so that the total income for the company was not changed? Write the answers to the questions at the bottom of your spreadsheet before you print it out. Clary's Laundry Load LAUNDRY from SPREADSHEETS and complete the spreadsheet by putting formulae into the cells and filling them down. Note: The time Is actually stored as a number between 0 and 1, indicating the fraction of the day that has passed since midnight. 6:00 AM is actually stored in Excel as the number 0.25, ie .25 of a day. In column D, you will have to use the formula (Finished-Started) *24 to find the number of hours worked. Spreadsheets and Lookup Tables The IF function allows you to choose one of two values to be returned. The VLOOKUP function that is used in this set of exercises allows you to select one of a number of possible values. The form of VLOOKUP is VLOOKUP(value, table-reference, column). As an example the formula =VLOOKUP(A3,R5:T12,2) uses the value in cell A3, and tries to match it with those in column R (also known as the 1st column) of the table R5:T12. If there is no exact match, it uses the next lower value in the table. It then returns the value in the same row, but column 2,- ie column S in this example. 1. Open the spreadsheet SPREADSHEETS\ILOOKUP\GARAGE.XLS. Enter the number 3171 into cell E6. Put formulae involving the VLOOKUP function into cells E9, E11, E13 and E15 to obtain information from the table of data that starts in J23. Try part numbers 3275 and 4763. 2. Open the spreadsheet SPREADSHEETS\LOOKUP\MARKBOOK.XLS. Calculate the percentage and the grade from the lookup table. 3. Open the spreadsheet SPREADSHEETS\LOOKUP\ELDERS.XLS. Elders have a number of different account types, and each is given a different percentage discount, as shown in the spreadsheet. Complete the spreadsheet to calculate the discounts etc for each farmer, as well as the statistics at the bottom of the table. 4. Open the spreadsheet SPREADSHEETS\LOOKUP\APPOINT.XLS. Below is a partial bus timetable for the 728 bus from Blackwood station to the city. You have an appointment in the city at the times indicated. What time to you have to be at the Blackwood railway station to catch the bus that will get you to town in time to make the appointment. Also include the wait in minutes that you will have between the time the bus arrives and the appointment. 5. Open the spreadsheet SPREADSHEETS\LOOKUP\TAXPAK.XLS. This is a ready reckoner for your tax this year. The Range column gives the lower end of the range of salaries, the Tax* column indicates the tax that has to be paid on that amount and the % Tax column shows the tax rate on the income above the figure in the Range column. Use a lookup table to calculate the tax payable on the amounts shown and also the net income. 6. Open the spreadsheet SPREADSHEETS\LOOKUP\NODDY.XLS. Noddy's Nursery handles a limited range of exclusive plants and supplies a small number of customers. They are developing a spreadsheet to help them efficiently print out personalised invoices. This spreadsheet consists of a number of sections. a) Purchase Details Section, where the item code number and quantity are entered. The account number and the shipping charges code is also entered by the sales person. b) Data Tables * details of the stock held in Noddy's Nursery. * the account details for each of Noddy's clients. * the shipping codes and the charges. c) The Invoice which is to be printed and given to the customer. This is the section Noddy found difficult. He didn't know how to add the formulae into the spreadsheet, but has put notes in italics where you have to help him.