Excel: Functions and Data Analysis Tools

Instructional Services at KU Libraries A Division of Information Services
www.lib.ku.edu/instruction

Abstract: This workshop focuses on the functions and data analysis tools
of Microsoft Excel. Topics included are the functions such as AVERAGE and SUM, and data analysis tools such as pivot tables and conditional summations.

Contents
Introduction ..................................................................................................................... 3 Objectives ....................................................................................................................... 3 Prerequisites ................................................................................................................... 3 Related Training Available from Instructional Services .................................................... 3 Definitions ....................................................................................................................... 4 Inserting Functions.......................................................................................................... 6 Sample Functions ....................................................................................................... 7 Add-In Commands and Functions ................................................................................. 10 Loading an Add-In ..................................................................................................... 10 Unloading an Add-In.................................................................................................. 11 Data Analysis Tools ...................................................................................................... 11 Histogram.................................................................................................................. 11

© 2006 The University of Kansas. All rights reserved

.............Instructional Services Excel: Functions and Data Analysis Tools Conditional Sum .................... 19 Instructional Services at KU Libraries A Division of Information Services -2- © 2006 The University of Kansas ......................................................................................................................... 15 Array Formulas.......................................................................... 18 Getting Additional Help ................................................................... 14 Analyzing Data with the PivotTable ........................................................................................

and approved affiliates. chart. faculty. visit www.edu/instruction/workshops. and track workshops you’ve registered for and have attended. Objectives The goal of this workshop is to introduce participants to the more complex features of Excel. and list management utilities. After today’s workshop participants will be able to: • • • • • • define terms related to using functions create and edit a function identify add-in functions perform data analysis using Data Analysis Tools create a formula with the Conditional Sum wizard learn to troubleshoot a formula Prerequisites It is assumed that the participants in this workshop have either taken the Excel: Data Management workshop or have equivalent skills. Related Training Available from Instructional Services All workshops offered by Instructional Services are free to KU students. please email training@ku.ku. receive automatic announcements of upcoming workshops. Instructional Services at KU Libraries A Division of Information Services -3- © 2006 The University of Kansas .Instructional Services Excel: Functions and Data Analysis Tools Introduction Microsoft Excel consists of three basic parts: its spreadsheet. This workshop concentrates on inserting and using functions and other data analysis tools. staff.edu. Using a single set of data. these separate utilities can work together or individually.lib. For further workshop related questions. To learn more about or register for workshops.

5. If you enter the formula = 7 + 7 * 5. >. labels. <. If a formula contains operators with the same order of precedence. click Formula Bar on the View menu. using order of precedence rules. Example: = 10+10*4 or = (10+10)*4 Excel performs operations in the order shown in the following table. unless the use of parentheses changes the order of calculation. <=. To display or hide the formula bar. Formulas are calculated left to right. All formulas begin with an equal sign (=) followed by operands (the data to be calculated) and operators. (comma) (single space) % ^ * and / + and & =. Operator : (colon). or built-in functions. if you enter the formula = 7 + 7 . Formulas calculate simple values such as addition or multiplication. the calculation is performed left to right since both + and . <> Description Reference operators Negation (as in -1) Percent Exponentiation Multiplication and division Addition and subtraction String Concatenation Comparison Formula syntax Formula bar Order of precedence Instructional Services at KU Libraries A Division of Information Services -4- © 2006 The University of Kansas . Formula syntax is the required structure or order of formula elements. or more complex values using Excel’s built-in functions. >=. Operands can be values that don’t change (constants). Excel evaluates the operators from left to right. names. or built-in functions. operators. In Excel. For example. Excel performs the multiplication first since * has a higher precedence than +. enclose the part of the formula to be calculated first in parentheses. all formulas begin with an equal sign (=) and are followed by any valid combination of data.have the same precedence.Instructional Services Excel: Functions and Data Analysis Tools Definitions Term Formula Definition A formula is an equation that performs a calculation on data in your worksheet. references. range references. To change the order of evaluation. The formula bar displays the constant value or formula in the active cell. The formula bar is the area located at the top of the worksheet window that is used to enter or edit values or formulas in cells.

On the Help menu. if the function is expecting a number. For example. A list of all add-ins automatically installed with Excel is available in the online help. The syntax of a function begins with the function name. the arguments for the function separated by commas.. Add-ins use a lot of memory. it does not delete the add-in. Add-ins might place additional commands on Excel menus. An add-in that has been unloaded can be reloaded since it remains on your computer. Arguments Function syntax Instructional Services at KU Libraries A Division of Information Services -5- © 2006 The University of Kansas . you must first install the add-in and then load it. or cell references. Arguments can also be formulas or other functions. Example: SUM(D2:F8) In the above example. text. error values such as #N/A. Arguments can be numbers. so unload add-ins you do not use often. logical values such as TRUE or FALSE. Once an add-in is loaded. arrays. it is available within Excel. Add-ins are programs that provide optional commands and features. an equal sign (=) should be placed before the function name. Function Arguments window Add-ins The Function Arguments window helps you create or edit a function and also provides information about functions and their arguments. click Microsoft Excel Help and enter Add-in programs included with Excel. The values used in the function are called arguments. text is not a valid value for that argument). The argument you designate must produce a valid value (i. dates and times. followed by an opening parenthesis. If the function starts a formula.e. the function name is SUM and the argument for the function is the range D2:F8.Instructional Services Excel: Functions and Data Analysis Tools Function A function is a predefined formula that performs calculations by using specific values in a particular order. and these arguments must appear in a specific order. You can also use Visual Basic programs as custom add-ins. To make an add-in available. and a closing parenthesis. the AVERAGE function calculates the average of its arguments. Unloading an add-in only removes its features and commands from Excel.

a description of that argument appears at the bottom of the window. 2.e. To insert a function: 1. while others can have a variable number of arguments. or Selecting a function category from the drop-down menu. a reference to another cell or range. Some things to note about it include: • When you click in the blank field beside each argument name. A description of the function itself also appears. Click the Insert Function button on the Formula Bar ( ) or select Insert > Function in the menu. Each argument can be a constant value (i. Double-click the name of the function. The Insert Function dialog box 4. The Insert Function dialog box appears. Some functions have a predefined number of arguments. For those functions that can take a variable • • Instructional Services at KU Libraries A Division of Information Services -6- © 2006 The University of Kansas . Select the cell in which you want the results of the function to display. Choose the function you wish to use by either • • Typing a description of the function and clicking Go.Instructional Services Excel: Functions and Data Analysis Tools Inserting Functions The Insert Function dialog box is designed to help in the construction and use of the various built-in functions and their arguments.. a number). or click the function and click OK. 5. 3. The Function Arguments dialog box appears. or the result of another formula.

and a formula result.) Instructional Services at KU Libraries A Division of Information Services -7- © 2006 The University of Kansas . 6. The value of each argument is displayed to the right of its input field. Excel automatically provides you with a blank field for an additional argument after each argument you add. To return to the expanded Function Arguments window. Syntax CONCATENATE(text1. The “&” operator can be used instead of CONCATENATE to join text items. Fill in the arguments. The Function Arguments window for the AVERAGE function.. Note that the three arguments entered take the form of a number..text2.Instructional Services Excel: Functions and Data Analysis Tools number of arguments. 7. and the overall result of the function is displayed at the bottom next to Formula result =. To select ranges on your worksheet. a range reference. click beside the appropriate field. Click OK. The Function Arguments window closes and returns you to your worksheet with the results in the active cell. Excel collapses the Function Arguments window so that you can click and drag to select the correct range on your worksheet. Sample Functions CONCATENATE The CONCATENATE function joins several text strings into one text string. The formula appears in the Formula Bar.. • The value of each individual argument is calculated and displayed to the right of the argument’s input field. respectively. click or press Return.

In this case.."at ". Cells with formulas that return "" (empty text) are also counted (thus cells with empty text are counted by both COUNTA and COUNTBLANK). (Excel treats dates and times as numbers. (Note the extra space after “Instructional Services” and “at”... numbers. value2.. COUNT Counts the number of its arguments that contain numbers."KU Libraries") is equivalent to " Instructional Services at KU Libraries". … are 1 to 30 arguments representing the values you want to count.value2. Syntax COUNTA(value1.B2.. The text items can be text strings.value2. text2.Instructional Services Excel: Functions and Data Analysis Tools Arguments Text1.) COUNTA Counts the number of cells that are not empty. or single-cell references. including empty text ("") but not including empty cells."KU Libraries") is equivalent to "Instructional Services at KU Libraries". Syntax COUNT(value1. It is important to note that CONCATENATE does not insert spaces for you.) Arguments Value1. a value is any type of information. Use COUNTA to count the number of cells that contain data in a range or array. COUNTBLANK Counts empty cells in a specified range of cells. value2.. but only numbers are counted. so they will be counted.) If cell A2 contains "Instructional Services " and B2 contains "at " then CONCATENATE(A2. Cells that evaluate to zero are not counted. … are 1 to 30 arguments that can contain or refer to a variety of different types of data. … are 1 to 30 text items that are joined into a single item. Notes CONCATENATE("Instructional Services ".) Arguments Value1. Syntax COUNTBLANK(range) Instructional Services at KU Libraries A Division of Information Services -8- © 2006 The University of Kansas .

col_index_num. a reference. VLOOKUP returns the #REF! error value. If col_index_num is less than 1. The lookup_value can be a value.Instructional Services Excel: Functions and Data Analysis Tools Arguments Range is the range of cells in which you want to identify blank cells. but since data is generally organized in columns. or logical values. if col_index_num is greater than the number of columns in table_array. Criteria is a string that must be satisfied for the cell to be counted. The values in the first column of table_array can be text. VLOOKUP In general. "enrolled" counts a cell only if it contains exactly the text enrolled. criteria) Arguments • • Range is the range of cells in which you want to count cells.range_lookup) Arguments • • Lookup_value is the value to be found in the first column of the table array. VLOOKUP is used frequently. Range_lookup is a logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match.table_array. an approximate match is • • Instructional Services at KU Libraries A Division of Information Services -9- © 2006 The University of Kansas . If you create a range name like List or Sales_Table. it is easy to copy the function without losing your reference to the table range. Syntax VLOOKUP(lookup_value. Some examples: o o o 123456 or "123456" counts a cell only if it contains exactly 123456. For example. lookup functions are used to look up data in a list and return a corresponding value. a col_index_num of 2 returns the value in the second column in table_array. VLOOKUP (vertical lookup) is one of several lookup functions. VLOOKUP returns the #VALUE! error value. Otherwise you will need to use absolute addressing in specifying the table. ">123456" counts a cell only if its contents are greater than 123456. If the range_lookup argument is omitted (and thus treated as TRUE). Col_index_num is the column number in the table_array from which the matching value must be returned. COUNTIF Counts the number of cells within a range that meet the given criteria Syntax COUNTIF(range. numbers. or a text string. Table_array is the table of information in which data is looked up.

Instructional Services at KU Libraries A Division of Information Services . On the Tools menu. appears to be a part of the Excel program. Notes If range_lookup is TRUE. from the table on the left. Add-In Commands and Functions An add-in is a set of commands or functions that. If range_lookup is FALSE. Loading an Add-In Once an add-in is loaded. it is always available until you unload it. the Sales Level column and the Bonus Rate column comprise the table_array. the error value #N/A is returned. Example Using the VLOOKUP function Using the above image as an example. click Add-Ins. once loaded. The col_index_num is 2 since the rate that you want to report is in the second column of the table_array. in such a case. If the add-in is not installed on your computer. If range_lookup is FALSE.Instructional Services Excel: Functions and Data Analysis Tools returned. otherwise VLOOKUP may not give the correct value. click Browse and then locate the add-in. table_array does not need to be sorted. Add-in commands or functions may be user-created macros or those included with Excel. 1. Note that since the Sales value does not match the Sales Level exactly. If the add-in you want to use is not listed. VLOOKUP will find an exact match and if an exact match is not found. the next largest value that is less than lookup_value is returned. The Sales column is the lookup_value and. 2. The Add-Ins dialog box appears.10 - © 2006 The University of Kansas . since you want to determine what rate should be paid for corresponding sales. the VLOOKUP formula is placed in the Bonus column in the table on the right. In the Add-Ins available list. If an exact match is not found. the table on the left must be sorted by the Sales Level column in ascending order. Not all add-ins are automatically loaded because add-ins use a lot of memory. click the checkbox next to the add-in you want to load. the values in the first column of table_array must be placed in ascending order. you must install it. Some Excel add-ins are automatically loaded when Excel is installed. you can omit the range_lookup or type TRUE. the user loads others. The range_lookup is TRUE because we don’t need to match the sales exactly. To load an add-in.

3. A histogram is one tool in the Analysis ToolPak that shows how frequently values occur in each numeric interval of a specified range. Click OK. The bin range is optional. You need to specify the following: • • The input range: the range of values to analyze. Setting Up the Data A histogram counts how many of the values in a range (input range) fall within specified numeric intervals (bins). Data Analysis Tools Histogram The Analysis ToolPak is one of several add-ins available with Excel. in a group of people. Unloading an Add-In Unloading add-ins that you don’t use can save memory since all loaded add-ins are always loaded into memory when Excel is opened.11 - © 2006 The University of Kansas . On the Tools menu. the Histogram tool creates a set of evenly distributed bins between the data's minimum and maximum values.Instructional Services Excel: Functions and Data Analysis Tools 3. The output range: an area to display the histogram. In the Add-Ins available list. it is not deleted from your computer. You need to set up your worksheet before running the Histogram data analysis tool. Instructional Services at KU Libraries A Division of Information Services . If you omit the bin range. it is recommended that you create your own bins. The bin range: the range of cells that contain a set of boundary values. Its data analysis tools are used in the collection. clear the checkbox next to the add-in you want to unload. 2. However. Click OK. the Age column is the input range since this is the column of data to analyze. click Add-Ins. • Input Range In the example below. and interpretation of numeric data. you could determine the distribution of ages within age categories. For example. because these bin intervals may have little relation to your data. or the type of analysis you are looking for. 1. organization. When you unload an add-in.

Select Histogram from the Analysis Tools list in the Data Analysis dialog box. Instructional Services at KU Libraries A Division of Information Services . 3. above. Choose Data Analysis from the Tools menu 2. Creating the Histogram Before accessing the Histogram tool. make sure the intervals for the bin range are specified in ascending order. Output Location The results of the distribution can be placed in an area on the current worksheet.12 - © 2006 The University of Kansas . Click OK to display the Histogram dialog box. or in another workbook. make sure your worksheet is set up properly. the bin range contains the age intervals. When setting up a histogram.Instructional Services Excel: Functions and Data Analysis Tools Bin Range In the example above. on another worksheet within the same workbook. See Setting Up the Data. To create a histogram: 1.

Instructional Services Excel: Functions and Data Analysis Tools The Histogram dialog box 4. New Worksheet Ply Click to insert a new worksheet in the current workbook and paste the results starting at cell A1 of the new worksheet. Output Options Output Range Enter the reference for the upper-left cell of the output table. See Output Options. Excel creates a set of evenly distributed bins between the data’s minimum and maximum values. Instructional Services at KU Libraries A Division of Information Services . You can name the worksheet by typing a name in the input area after selecting New Worksheet Ply. Specify the output location. Enter the range of cells to analyze in the Input Range box.13 - © 2006 The University of Kansas . 6. below. New Workbook Click to create a new workbook and paste the results on a new worksheet in the new workbook. Excel generates appropriate data labels for the output table. Enter the bin range in the Bin Range box. Clear this checkbox if your input range has no labels. Other Histogram Options Labels Select Labels if the first row or column of your input range contains labels. If you omit the bin range. 5. The size of the output area is automatically determined and Excel displays a message if the output table might overwrite existing data.

After all selections are complete. To start the wizard: 1. the conditional sum function can determine how many people are on academic probation that transferred from other schools.14 - © 2006 The University of Kansas . Leave unchecked to omit the cumulative percentages. to summarize values in a list based on specific conditions.) Use the dropdown menu to select available options for the Column to sum. another add-in. In this example. In the example below. Click a cell within the table or list. the output data table includes the results displayed in descending order of frequency. The Conditional Sum Wizard can help you determine the number of records in a table that meet a certain criteria. (See the image on the next page. Also use drop-down menus to determine the criteria for the data to sum. Enter the information requested.Instructional Services Excel: Functions and Data Analysis Tools Pareto If the Pareto box is checked. (See Add-In Commands and Functions. Click the Add Condition button to add criteria to the list. Instructional Services at KU Libraries A Division of Information Services . Chart Output Select Chart Output to generate an embedded histogram chart with the output table. On the Tools menu. The Conditional Sum Wizard is an add-in. click Finish in the last dialog box. there are two criteria that need to be defined and then a sum of those who meet both. 2. page 10. Conditional Sum Use the Conditional Sum Wizard. 4. you can define more than one criterion. click Conditional Sum. Excel generates an output table column for cumulative percentages.) 3. install and load the wizard. If the Conditional Sum command is not on the Tools menu. Cumulative Percentage If the Cumulative Percentage box is checked.

or cross-tabulates. The PivotTable summarizes data by using a summary function that you choose. or use your own formulas by adding calculated fields and items. You can also filter data by displaying different “pages”. 1. All the unique values in this Name column become items in the PivotTable. Your worksheet data must be organized in a list or database format. there would be a PivotTable field called Name that you could place as a row label or column label in the PivotTable. Place your cursor inside the list. such as SUM. if we have a list of data with a column called Name. Instructional Services at KU Libraries A Division of Information Services . all the data from those five rows would be collapsed and summarized into a single PivotTable item labeled “John Doe”. each column in your source data becomes a PivotTable field that summarizes multiple rows of information. large amounts of data. In a PivotTable. or by selecting specific areas of interest. or AVERAGE. COUNT.) 2. (See the Excel: Data Management handout. So if there are five rows with “John Doe” under the Name column. A PivotTable wizard provides help in creating PivotTables. Before creating a PivotTable Before starting the PivotTable wizard. You can “pivot” rows and columns in and out of the table to view various summaries of data. You can include subtotals and grand totals automatically.Instructional Services Excel: Functions and Data Analysis Tools The Conditional Sum Wizard Analyzing Data with the PivotTable A PivotTable is an interactive table that summarizes.15 - © 2006 The University of Kansas . For example.

Select PivotTable and PivotChart Report from the Data menu. 5. You can redefine the list if necessary by using your mouse to select the data source and then press Enter to return to the dialog box.Instructional Services Excel: Functions and Data Analysis Tools 3. 1. 6. Identify the location of your PivotTable data source. Instructional Services at KU Libraries A Division of Information Services . 2. Click Layout. If your cursor is inside the list or database area. The default setting is an Excel list or database on your current worksheet. Select the range of cells that comprise your list. Remove any subtotals created with the Data > Subtotals command. in the bottom left corner of the wizard. Excel selects the data automatically. (See the Excel: Data Management handout. since grand and subtotals are automatically created as part of the PivotTable. 3. Any column labels on your list are displayed as buttons and referred to as fields. Choose whether you want the PivotTable to appear on a new worksheet or an existing one. Click Next. 7. Each field can be placed in one of four parts of the PivotTable. make sure you have followed the instructions above. 4. Click Next.) Creating a PivotTable Before beginning the PivotTable wizard. The PivotTable wizard. A sample PivotTable layout displays.16 - © 2006 The University of Kansas . The first step of the Wizard displays.

from the PivotTable toolbar (see below). the PivotTable toolbar automatically displays. 9.Instructional Services Excel: Functions and Data Analysis Tools ROW: Any field placed in the ROW area becomes a row label. COLUMN: Any field placed in the COLUMN area becomes a column label. point to Select and click Enable Selection. such as SUM. use the following table as a guide. which allows you to dynamically alter fields in your table. click PivotTable.17 - © 2006 The University of Kansas . If the above methods do not select. AVERAGE. DATA: Any numeric field placed in the DATA area is summarized (using the summary function you specify. PivotTable Toolbar When a PivotTable is displayed on a worksheet. etc. 8. Excel also displays the PivotTable Field List. To place a field in the pivot table. 10. PAGE: Any field you want to use as a filter is placed the PAGE area. Click Finish. Clicking… Row field Row item Column field Column item Summary label Grand Total label Selects All row labels All item data All column labels All item data Entire table Column or row totals Table components and selection Double-click the row or column fields to display the PivotTable Field dialog box. To select areas of the PivotTable.). Editing the PivotTable You can edit and format many components of the PivotTable. Click OK when the layout is complete. drag its name to the appropriate area. Instructional Services at KU Libraries A Division of Information Services .

Array Formulas An array formula is a formula that performs multiple calculations and returns either a single result or multiple results. On the PivotTable menu of the PivotTable toolbar. Click a cell in the PivotTable. the source data is not deleted or changed. You create array formulas the same way that you create basic. Instructional Services at KU Libraries A Division of Information Services . Both these can be used to change the PivotTable data display and values. 2. single-value formulas. Deleting the PivotTable To delete a Pivot Table.18 - © 2006 The University of Kansas . 4. point to Select and click Enable Selection. 3. point to Clear. On the PivotTable menu of the PivotTable toolbar. and then click All. On the Edit menu. Array formulas act on two or more sets of values known as array arguments. with a slight exception. point to Select and click Entire Table. Each array argument must have the same number of rows and columns.Instructional Services Excel: Functions and Data Analysis Tools The PivotTable toolbar and PivotTable Field List Click the PivotTable menu on the PivotTable toolbar and select PivotTable Wizard to access the original PivotTable wizard and to access the PivotTable Field List. 1. When you delete a PivotTable.

Make sure each external reference contains a workbook name and the path to the workbook. enter 1000 in the formula. For example. When you create a formula. The worksheet ranges and the corresponding arguments within the formula display in colors to clearly define your formula arguments. Enter the formula.ku. You can enter. no more than seven levels of functions within functions. 2. Make sure you use the correct range operator when you refer to a range of cells. • • • Getting Additional Help The Help Desk provides consulting and Q&A help in a variety of ways: 785/864-0200 question@ku. Brackets {} display around the entire formula. even if the value you want to enter is “$1. 3.edu/~helpdesk Last Update: 02/06/2006 Instructional Services at KU Libraries A Division of Information Services . • • • If the name of a workbook or a worksheet you refer to contains a non-alphabetic character. Troubleshoot errors in formulas If you have problems when creating functions. Excel displays parentheses in color as they are entered.edu www. Parentheses are part of a matching pair. When you refer to a range of cells. Make sure you have entered all arguments that are required and not any extras. Some functions have required arguments. check the following to troubleshoot your formulas: • Double-click the cell that contains the formula to edit the formula. you must enclose the name within single quotation marks.Instructional Services Excel: Functions and Data Analysis Tools Entering an Array Formula To enter an array formula: 1.000”. If you want only a single result. Excel may need to perform several calculations to generate that result. Press Ctrl+Shift+Enter to enter the formula within the cell. Do not format numbers as you enter them in formulas. use a colon (:) to separate the reference to the first cell in the range and the reference to the last cell in the range. or nest. Select the cell or cells that will contain the formula. including the equal sign.19 - © 2006 The University of Kansas .

Sign up to vote on this title
UsefulNot useful