Business Data Analysis MA0123 Dr Gavin Shaddick Department of Mathematical Sciences g.shaddick@bath.ac.uk 4W 5.7
Lectures and computer labs Two lectures a week (Monday and Friday). One computing lab (time dependent on your group). Assessment is 100% by coursework (no final exam). two Excel exercises and a project submitted via moodle https://moodle.bath.ac.uk
Course outline Introduction to Excel Types of data Data handling Charting data Collating and categorsing data Data description Central tendency Dispersion Association Regression analysis Introduction to time series
Course text Business Data Analysis using Excel David Whigham Oxford University Press ISBN: 978 0 19 929628 6 Available in the bookshop Online resources: www.oxfordtextbooks.co.uk/orc/whigham
Excel spreadsheets Data is entered and manipulated in Excel within cells. When you view an Excel chart on the screen, each rectangle is a cell. Cells can contain letters, numbers or equations. Equations operate on other cells in the spreadsheet to calculate values.
Rows and columns The cells are divided into columns, designated by letters, and rows. Cells are designated by numbers, and are denoted by the letter, followed by the number. The first cell (in the top left hand corner) on a worksheet is A1. Easiest way is to type the desired value into the cell and press enter.
Pasting a series Pasting a series of data is useful if there is a regular pattern to the data, or if it is useful to view the form of an equation. Illustrates some useful techniques.
Example: Open new worksheet, and place the cursor in the top left most cell (A1). Type 1 and press Enter. The number 1 should appear on the right side of the cell, and the cursor should move to cell A2. Type 2 and press Enter. The first two cells in column A should now be filled with 1 and 2. Select cells A1 and A2 by clicking and holding the mouse button on cell A1, dragging to cell A2, and releasing the mouse button. Using the mouse, place the arrow at the bottom right corner of the selection, the handle, which is marked by a small square. The cursor should change to indicate that you are on the handle. Click and drag the handle down to cell A10. This will fill cells A1 10 with the numbers 1 through 10. You can drag the handle to different cells to create different length series. To create series with different intervals, simply change the first two numbers. In cells B1 and B2, enter 0 and 0.1, respectively. You can have decreasing and negative series as well.
Formulas and equations You can use Excel to generate complex equations, however for now we will only treat simple ones. Table of operators
Continuing the example In cell C1, beside the 0 from the second series, type =, then select cell B1. Cell C1 should now contain the phrase =B1. The "=" sign tells Excel that the text following the = is part of an equation. Type*2+5 so cell C1 should read =B1*2+5. Press enter Cell C1 should now show 5, i.e. 0*2+5 Copy this equation to the other cells in column C by dragging the handle of cell C1 to C16.
The result
Further example In column E, create a series from 1 to 1 with an increment of 0.2. In cell F1, type the equation =E1^2+$A$2 and drag it over the whole series in column E. Note the $ sign it tells Excel that it should always use the value in A2 and is not changed when pasting the formulae. You can also use the $ once $A2 means the column stays constant (column A) and only the rows change when the formulae are pasted. A$2 means the row stays constant.
Results
Functions Excel contains a large number of pre programmed functions Functions, like equations, are always preceded by an equals sign. Then the name of the function is given. Followed by arguments, separated by commas If an argument is a range of cells, then the first and last cells are given separated by a colon : Example, SUM =SUM(A1:A2) Is the same as A1+A2
Summing a column Summing the columns in the previous example Type =sum(a1:a10) into cell A11 Highlight cell A11 and drag the handle across to cell F11
Summing rows Highlight cell G1 Type = SUM(A1:F1) Highlight cell G1 and drag the handle down to cell G11. This will also sum the column sums already summed in the last cell (G11).
Selecting an area of the spreadsheet Easily done with the mouse Highlight the first cell to be selected. Whilst pressing (the left) mouse button, drag the mouse over the cells you want to select. Those cells will be highlighted. You can now cut all the cells and paste them elsewhere.
Example Highlight cells A2:C10 Cut those cells, by either using the cut button on the HOME ribbon or pressing control and X at the same time.
..continued To paste those cells elsewhere, highlight the top left hand cell where you want them to be. Paste the cells either by clicking paste on the HOME ribbon or by pressing control and V at the same time For example, highlighting B14 and pasting
Saving, closing and opening files The information you enter into Excel is stored in files. When Excel is opened for the first time in a new session a workbook with the title Book1 (or Workbook1). This is the filename that Excel automatically assigns.
Saving your work From the FILE ribbon SAVE will save the workbook with current name (the one in the title) SAVE AS allows you to rename the workbook before it is saved (and change where it is saved). After the first time you can use SAVE, it will use the filename you used. You can always use SAVE AS.
Copying The ability to copy text, formulae and functions is a very powerful feature. We will work through an example to show some of the possibilities. Start by creating a blank workbook FILE then NEW then BLANK WORKBOOK Enter the title into cell A1 BRITFUEL PLC PRICE, COST AND PROFIT DATA Enter the column names into cells A3 to D3 Item code, Price, Unit cost, Unit Profit Enter Item 1 into cell A4 Drag the handle down to cell A16 Enter the data into columns B (Price) and C (Unit cost)
Entering the data
Formatting cells Note that there are signs in the cells for the prices and costs. You do not have to enter these yourself Instead you can format cells to be currency HOME >FORMAT >format cells
Work out the unit profit Enter in D4: =B4 C4 Click on the handle and pull down to cell D16
Work out the unit net profit Enter into cell A2: Tax rate In cell B2 enter 0.15 or 15% You can use format again to make the % sign appear when you put in a proportion. In cell E3, enter Unit Net Profit Enter =D4 B2*D4 or =D4 (B2*D4) into cell E4 What happens if we drag the formula down to E16?
Problem! We should have fixed the cell B2 using $B$2 (strictly speaking we only needed to fix the row; B$2) Note the #VALUE! error notification in cell E5, this is because we are trying to calculate D5 B3*D5 which is 0.54 Price*0.54. We cannot do arithmetic on words!
Solved! We need to need the fix the position of the tax rate, so cell E4 should contain =D4 B$2*D4. The cells below do not update automatically, you have to pull the handle down to cell E16 again.
Inserting and deleting rows and columns Rows and columns can be inserted into the worksheet and formulae will be adjusted automatically. For example, consider the following worksheet
The summation Note that the sum given in cell B12 is calculated using the function =SUM(B2:B11) If we insert a row between Regions 5 and 6 Highlight the entire row 6 by clicking on the 6 in the row indicator column INSERT The SUM command in B12 is automatically updated to =SUM(B2:B12)
Working with multiple sheets Notice at the bottom of the workbook there are several worksheets. You can rename these by clicking on the default names and overwriting them You move between them by clicking on the tabs
Formulae using more than one sheet You can reference cells from any sheet in a formula. The format is Sheet!Cell For example, if we had the 2003 and 2004 data in the first two sheets, we could find the sum of the two years sales using the following =SUM(2003DATA!B13+2004DATA!B13). Again, you can pull the handle to fill in formula but may require more care!