Computer Data Analysis CGS 2518 Instructor: Greg Shaw Microsoft Excel 2007 – Chapter 2 Formulas and Functions: Math Basics for Spreadsheet Use Skills Checklist and Notes Entering Cell References by Clicking When entering a formula, cell references may be specified either by typing or just by clicking in the cell Entering cell references by clicking helps eliminate mistakes! Copying Formulas and Functions Using AutoFill (i.e., by Dragging the “Fill Handle”) Select the cell containing the formula/function and drag its fill handle over a range of destination cells! The “fill handle” is the little black square in the lower righthand corner of the active cell This method is faster, but can only be done when the destination cells are adjacent to the “source” cell When the mouse pointer is correctly positioned on the fill handle, it will look like this: If instead it looks like two crossed arrows, then dragging will move the formula/function instead of copying it Relative and Absolute Cell References See online document, “Relative vs. Absolute Cell Referencing” Excel Function Basics All Excel functions have this general form (or, “syntax”) =name( argument(s) ) where name is the function name and argument(s) is/are the value (or values) upon which the function operates Excel function arguments consist of one or more cell ranges, cell references, or constants, separated by commas Recall that a cell range is a rectangular block of cells. We specify a cell range by using the references (names) of the upper-left-hand cell and the lower-right-hand cell, separated by a colon (:) Examples, using some common Excel functions: =AVERAGE(C10:C22) (computes average of values in cells C10 through C22) =MAX(D8:D20) (finds largest value in cells D8 through D20) =MIN(B7:G13) (finds smallest value in cells B7 through G13) =SUM(B7:G13) (computes sum of values in cells B7 through G13) =MEDIAN(E6:E37) (computes median of values in cells E6 through E37) =COUNT(C10:D16,G10:H16) (counts the number of cells in the ranges C10:D16 and G10:H16 that contain numeric values) This one shows that functions may have multiple arguments - here there are two - separated by commas =COUNTA(A10:A20,C10:C20,E10:E20) (counts the number of cells in the ranges A10:A20, C10:C20, and E10:E20 that are nonempty) Date Functions: =TODAY() and =NOW() The TODAY() function displays the current date in a cell and the NOW() function displays the current date and time The values returned by these functions are updated automatically whenever a sheet is opened or a new calculation is done These function take no arguments, but empty parentheses are still required (as is the equal sign (=) before the function name)! Calculating a Sum Using AutoSum The AutoSum button is on the Formulas tab, in the Function Library To sum a column of numbers, select the cell just below it and click the AutoSum button [] To sum a row, select the cell just to the right and click AutoSum To compute the sums of any number of columns and/or rows all at once, select the columns/rows plus one extra row below (for the column totals) and one extra column to the right (for the row totals). Then click AutoSum. Click the drop-down list arrow to the right of the AutoSum button to insert the Average, Min, Max, and Count functions instead of the Sum, using the above methods Inserting a Function ( Formulas | Function Library ) The Insert Function command is the easiest way to enter functions into a worksheet. It also minimizes typing mistakes and provides complete information about each function. 1. 2. 3. 4. 5. 6. Select the cell where you want the function to go On the Formulas tab, in the Function Library group, click on a category to insert a function from that category, or click the Insert Function button to search for a function by description or name In the Function Arguments dialog, there is a text box for each argument, along with a description of the argument For each argument, click in its text box and then drag to select the cell or range You can also type in the text box if, for example, you need to enter arithmetic operators Click OK The IF Function (See online document, “The IF Function”) The PMT Functions (“Payment”) and FV (“Future (See online document, “Financial Functions: PMT and FV”) The VLOOKUP Function (See online document, “The VLOOKUP Function”) Value”)