Microsoft Excel 2007 Module II E-Learning Services Marymount University Table of Contents Using Names ..................................................................................................................3 Naming Cells ...................................................................................................................3 Using Cell Names in Formulas ........................................................................................3 Naming Formulas.............................................................................................................3 Creating and naming Cell ranges.....................................................................................4 Working with Advanced Functions ..............................................................................5 VLOOKUP Function .........................................................................................................5 IF Function .......................................................................................................................5 Round Function................................................................................................................6 COUNTA Function ..........................................................................................................6 PMT Function...................................................................................................................6 Using Cell References ...................................................................................................7 Relative Cell Reference ...................................................................................................7 Absolute Cell Reference ..................................................................................................7 Using Styles and Auto-formats.....................................................................................8 Formatting Cells with Styles .............................................................................................8 Using Auto-format ............................................................................................................8 Finding and Replacing Data ..........................................................................................9 Finding and Replacing data .............................................................................................9 Finding and Replacing numeric data................................................................................9 Using Automatic Recalculation ........................................................................................9 Using Manual Recalculation ............................................................................................9 Freezing Worksheet Titles .......................................................................................... 10 Freezing Horizontal Titles .............................................................................................. 10 Freezing Vertical Titles .................................................................................................. 10 Clearing Frozen Titles .................................................................................................... 10 Working with Multiple Worksheets............................................................................. 10 Displaying Multiple Workbooks ...................................................................................... 10 E-Learning Services 2 Using Names Naming Cells Use file: 2Parts.xls 1. Click on cell B3. This selects the cell to name. 2. Click on the Formulas tab, then Define Name. Displays Define Name box. 3. Type Markup in the Name text box and then click OK. This renames the cell and adds the name to the Names in the workbook list box. Using Cell Names in Formulas 1. Click on Sheet 1, and then click on cell D5. Selects cell D5. You will enter a formula that calculates the revenue from sales by multiplying the number of parts sold by the retail price of a single unit. 2. Type =, click on cell C5, then type *. Enters the first part of the formula. 3. Click on the Formulas tab, Use in Formula, Paste Names. Displays Paste Name box. You can use this box to insert cell and range names into formulas. 4. In the Paste Name box, double click on BRK_472. This pastes the BRK_472 name into the formula. 5. Press Enter. Calculates the formula and enters the results in cell D5. 6. Copy the formula in cell D5 to cells D6 and D7. 7. Click on cell D6, highlight BRK_472 in the Formula bar, and then click on Formulas tab, Use in Formula, Paste Names. Displays the Paste name box. 8. In the Paste name box, double click on CARB_12. Replaces the formula and enters the result in cell D6. 9. Press Enter. This calculates the formula and enters the result in cell D6. 10. Click on cell D7 if necessary, highlight BRK_472 in the formula bar, then click on Formulas tab, Use in Formula, Paste Names. Displays Paste name box. 11. In the Paste name box, double click on SPRK_88. Replaces the name in the formula. 12. Press Enter. This calculates the formula and enters the result in cell D7. Cell D5 = $20,615.07; Cell D6 = $9,619.30; Cell D7 = $32,812.85 Naming Formulas Naming formulas will save time because you can insert the formula name rather than the formula. 1. First sum up cells D5-D7 in cell D18 = $63.047.22 2. Select cell D19 3. Click on Formulas tab, then Define Name. Displays the Define Name box. 4. In the Names in workbook text box, type Profit. Enters the name of the formula. 5. Press Tab twice. Selects the contents of the Refers to text box. 6. Click on cell D18. Displays a marquee around cell D18 and displays the reference =Sheet1!$D$18 in the Refers to text box. 7. Type *Markup. Refers to will look like this: =Sheet1!$D$18*Markup. This step completes the formula by multiplying the number in cell D18 by the value entered in the named cell, Markup. 8. Click on OK. This adds the defined name Profit to the workbook. Next you will use the formula you just named. 9. Select cell D19. E-Learning Services 3 10. Type =Profit, then press Enter. This enters the formula, Profit, and displays the result in cell D19. D19 = $15,761.81. Creating and Naming Cell Ranges Use file: 2Payroll1.xls 1. Highlight cells B6 through B9. This specifies the cells to include in the range. 2. Click on Formulas tab, then Define Name. Notice that the selected range is automatically entered in the Refers to text box. 3. Type Hours, then press Enter. This names the selected range. 4. Highlight cells C6 through C9, then display the Define Name box. This specifies the cells to name. 5. Type Payrate, then press Enter. This names the selected range. 6. Highlight cells D6 through D9, then click in the Name text box in the formula bar. 7. Type Taxrate, then press Enter. This names the selected range. 8. Assign the name NetPay to cells E6 through E9. Once you have assigned names to ranges, you can use them in formulas. 9. Click on cell B12, type =SUM(Hours), then press Enter. This totals the amounts contained in the Hours range (cell B6 through B9), then enters the result in cell B12. 10. Click on cell C12, then type =Average(Payrate), then press Enter. This calculates the average of the quantities in the Payrate range (cell C6 through C9), then enters the result in cell C12. 13. Click on cell D12, type =Average(Taxrate), then press Enter. This calculates the average of the percentages in the Taxrate range (cells D6 through D9), then enters the result in cell D12. 13. Click on cell E12, type =SUM(NetPay), then press Enter. This totals the quantities in the NetPay range (cells E6 through E9) then enters the result in cell E12. E-Learning Services 4 Working with Advanced Functions VLOOKUP Function Use file: 2Commission.xls Used to locate values in a lookup table for use in another area of the worksheet: 1. Activate Sheet1, press and hold SHIFT then click on Sheet2. This makes Sheet1 the active worksheet and expands the work environment to include Sheet2. 2. To display product descriptions, click on cell C6. Selects the cell. The first description you will look up corresponds to the product code AB42. 3. Activate the “Insert Function” dialog box by clicking on the “More Functions” option from the list displayed by clicking on the arrow beside the “AutoSum” button. 4. Select Lookup & Reference in the Function category list box, select VLOOKUP in the Function name list box, then click on OK. This selects the function you want to use and displays the Function Arguments box. 5. Move the Function Arguments box so that row 6 is visible. 6. Click on cell A6, then press Tab. Enters A6 as the lookup_value argument. 7. Type Products in the Table_array, then press Tab. This defines the name of the lookup table. 8. Type 2 in the Col_index text box. Defines the second column of the lookup table as the source of information to obtain. Press Tab. 9. Type in False under Range_lookup. This forces VLOOKUP function to locate an exact match to the lookup_value in the lookup table. Click on OK. Displays the result of the VLOOKUP function, Recliner, in cell C6. 10. Copy the function in cell C6 to cells C7 through C13. Displays the results of the VLOOKUP functions in cells C7 through C13. 11. Next you will use VLOOKUP to display prices. Click on cell D6, then activate the “Insert Function” box. 12. Select VLOOKUP function. 13. Click on cell A6, then press Tab. Enters A6 as the lookup_value argument. 14. Type Products in the Table_array text box, then press Tab. Defines the name of the lookup table. 15. Type 3 in the Col_index_num text box, then click OK. Defines the third column of the lookup table as the source of information to obtain. Copy the formula in D6 to D7 through D13. Displays the prices for all products. IF Function The IF Function is used to evaluate a condition in a worksheet and return different results based on the true/false status of the condition. The syntax for the IF Function is: IF(logical_test, value_if, value_if_false). 1. Click on cell E6, then activate the “Insert Function” box. 2. Select IF in the function name list box, then click on OK. This selects the function, then displays the Function Arguments box. 3. Move the Function Arguments box to make column E visible if necessary. 4. Click on cell E3, press the F4 key, type >4, then press Tab. This defines the logical_test argument. E-Learning Services 5 5. Click on cell B6, type *, click on cell D6, type *.05, then press Tab. This defines the value_if_true argument. 6. Click on cell B6, type *, click on cell D6, type *.03, then click OK. This defines the value_if_false argument and displays the result. 7. Copy the function in cell E6 to cells E7 through E13. Displays commission for all products. ROUND Function The ROUND function rounds numbers from the right or left side of the decimal point. 1. Total the commission figures in cells E6 through E13 in cell E15. 2. Click on cell E16, then type =ROUND( . This begins the function. 3. Click on cell E15, then type a comma, this enters the cell reference as the number argument. The comma is necessary to separate the arguments. 4. Type 0. This specifies to round the number to the left of the decimal point. 5. Press Enter. Rounds the number in cell E15 to the left of the decimal point and displays the result in cell E16. COUNTA Function The COUNTA function counts the number of entries in a range. 1. Activate Sheet3. 2. Click on cell C15, then type =COUNTA( . This begins the function. 3. Highlight cell B4 through B12, then press Enter. This enters the range reference as the function argument and displays the result of the COUNTA function, 8, in cell C15. 4. Click on cell B12, type Lamp, then press Enter. This adds a new product description to the worksheet and updates the number of products listed in cell C15, now there are 9 products carried. PMT Function The PMT Function calculates the periodic payments of a loan. 1. Activate Sheet4, click on cell B9, then click on function icon on the toolbar. 2. Select PMT in the Insert Function list box, then click on OK. 3. Move the Function Arguments box to make cells A1 through B9 visible if necessary. 4. Click on cell B6, type /12, then press Tab. This divides the annual interest rate, 21.5% by the number of payments to be made annually, 12, to establish the monthly interest rate. 5. Click on cell B7, type *12, then press Tab. This specifies the total number of payment periods, which is 3 years multiplied by 12, the number of months in each year. 6. Click on cell B4, type -, then click on cell B5. This defines the present value as the cost minus the down payment. 7. Click on OK. This calculates the result, ($153.63), which is the monthly payment for a 3-year loan amount of $4,300 with a down payment of $250 at an annual interest rate of 21.5%. E-Learning Services 6 Using Cell References Relative Cell References Use file: 1Mens Wear1.xls Specifies the location of a cell relative to the cell containing the formula. 1. Click on cell F6, then type =, click on cell E6, type *, then click on cell C6. Formula bar should read =E6*C6. Then click Enter. This lets you find the Total Sales for the sales column, which is $4005.00. 2. Click on cell G6, then type =. This begins the formula. 3. Click on cell F6, then type -. This specifies the Sales cell reference and the subtraction operator in the formula. 4. Click on cell D6, then type *. This specifies the Cost cell reference and the multiplication operator. 5. Click on cell C6, then click Enter. This specifies the Qty cell reference, then calculates the profit of $2,655 for the first product. 6. Click on cell F6, then drag the fill handle down to cell F18. This copies the formula in cell F6 into cells F7 through F18. 7. Click on cell G6, then drag the fill handle down to cell G18. This copies the formula in cell G6 into cells G7 through G18. 8. Click on cell G11. Notice that the Formula bar displays =F11-D11*C11. The relative cell references adjusted when you copied the formula into cells G7 through G18. 9. Click on cell F9. Notice that the Formula bar displays =E9*C9. Absolute Cell Reference Use file: 1Mens Wear1.xls Specifies the exact location of a cell without regard to the location of the cell containing the formula. 1. Click on cell H6, then type =. This begins the formula for commissions. 2. Click on cell G6, then type *. This specifies the Profit cell reference and the multiplication operator in the formula. 3. Click on cell B26, then click Enter. This specifies the Commission of $663.75 for the first product. 4. Click on cell G6. Then in the Formula bar click anywhere on G6. This activates the Edit mode. 5. Press F4. This inserts dollar signs ($) in the cell reference G6 and changes cell reference G6 in the formula from relative to absolute. 6. In the Formula bar, click anywhere on B26, then press F4. This inserts dollar signs ($) in the cell reference B26 and changes cell reference B26 in the formula from relative to absolute. The formula bar should read $G$6*B$26. This makes cell B26 the absolute reference cell times the product for a particular item of clothing. E-Learning Services 7 Using Styles and AutoFormats Formatting Cells with Styles Use file: 1Consolidated5.xls Styles is a collection of formatting instructions stored under one name. 1. Open file and click on cell A10. You will format cell A10 to create a style that you will apply to text in other cells. 2. On the Home tab, click on Bold icon and the Italic icon. 3. Display the Font Size drop down list and select 11. 4. Click on Cell Styles. This displays Style box. 5. Highlight the cell of which you wish to change the style. Select or preview styles by dragging your mouse across the options. Click the one you like. This creates the style Totals with the format specifications defined in the Style. 6. You can select a range of cells to apply this style to. Using AutoFormats Use file: 1Consolidated5.xls AutoFormats are a set of pre-defined table formats built into Excel, which you can use to turn a range of cells into a formatted table automatically. 1. Click on cells A5 through E31. 2. Click on the Home tab, then Format, Conditional Formatting, or Format as Table. 3. In the Table Formatting list box, select one of the options displayed. This selects the table format and displays examples. Click on the choice you like. The Format as Table box will appear. 4. Click on OK, then deselect the range to view the new AutoFormat. This applies the AutoFormat. E-Learning Services 8 Finding and Replacing Data Finding and Replacing Data Use file: 2Expenses.xls 1. Open up file and click on the Home tab, Find & Select, Replace. 2. In the Find what text box, type Gratuities, then press Tab. 3. Then type Tips. Specifies the replacement text. 4. Click on Find Next. Searches the active worksheet for an occurrence of the text specified in the Find what text box. 5. Click on Replace. Replaces the text in the active cell with the text in the Replace with text box. Then hit close. Finding and Replacing Numeric Data 1. Click on the Home tab, Find & Select, Replace. 2. Type 96, then press Tab. This specifies the number to find. 3. Type 97, then click on Replace All. This locates all occurrences of 96 and replaces each with 97. Then hit close. Using Automatic Recalculation 1. Scroll the worksheet to display columns G and J. 2. Click on cell G7, type 132, then press Enter. This enters data in the Mileage category for Day 5 and automatically recalculates the values in cells J7 and J22. Using Manual Recalculation 1. Click on the Formulas tab, Calculation Options. 2. Click on Manual in the Calculation Options menu. This activates the manual calculation option. E-Learning Services 9 3. Click on cell F18, type 30, then press Enter. This enters the price in the Tips category for day four. 4. Type 18, then press Enter. Enters the price in the Phone category for day four. 5. Type 42, then press Enter. Enters price in the Misc. category for day four. 6. Press F9. This forces a manual recalculation of formulas in the worksheet and displays the updated values in the appropriate cells. Freezing Worksheet Titles Freezing Horizontal Titles 1. Click on any row. Selects all cells in row. 2. Click on Window, Freeze Panes. 3. Scroll the window down. Moves the active pane upward. Freezing Vertical Titles 1. Click on any column. Selects all the cells in that column. 2. On the View tab. 3. Click on Window, Freeze Panes. Freezes the titles in column A so they will not move when scrolling. 4. Scroll the window to the right. Moves the active pane horizontally. 5. Click on Window, Unfreeze Panes to clear frozen pane. Clearing Frozen Titles 1. Click on Window, Unfreeze Panes. Clears the frozen pane. Working with Multiple Worksheets Displaying Multiple Workbooks 1. Open up two or three files. (With file 1, press and hold Ctrl, then click on file 2. Displays the file 2 as the active window.) 2. Click on the View tab, then on the Window menu, click Arrange All. 3. Click on Horizontal. Displays all open workbooks on the screen, one above the other. That wraps up the Microsoft Excel Module II Training. Further assistance can be found online at the Microsoft Office help site: http://office.microsoft.com/en-us/getstarted/FX101923361033.aspx or by calling ITS. E-Learning Services 10