1 PivotTable and PivotChart Reports, & Macros in Microsoft Excel Theresa A Scott, MS Biostatistician III Department of Biostatistics Vanderbilt University
2 Table of Contents 1 PivotTable and PivotChart Reports Introduction Data appropriate for a pivot table Pivot table terminology Creating a Pivot Table Step 1: Specifying the data location Step 2: Specifying the data Step 3: Completing the pivot table Using a dialog box to lay out the pivot table Using the PivotTable Field List toolbar to lay out the pivot table Customizing a Pivot Table Pivot table options Changing how the pivot table data is summarized Grouping pivot table items Converting a pivot table to a standard range of cells Creating a pivot chart Understanding pivot charts Summary Automating Tasks With Macros Introduction Recording a Macro Running a Macro i
3 Preface All of the lecture notes and supplementary sample data files are located at edu/theresascott under Current Teaching Material. If you have any questions, feel free to contact me at or (615) , or drop by my office D-2217 MCN. References for this lecture The following references were used to compile this lecture: ˆ Websites: ˆ Books: The Excel 2003 Module information available from Carnegie Mellon University s Computer Skills Workshop Class ( The BayCon Group Microsoft Excel Online Tutorial ( The Florida Gulf Coast University Excel 2000 Tutorial ( excel). Tips for Working with PivotTable Technology in Excel 2002 by Katherine Murray ( com/office/previous/xp/columns/column11.asp). Excel Charts by John Walkenbach (Wiley Publishing, Inc.; 2003). 1
4 Section 1 PivotTable and PivotChart Reports 1.1 Introduction Pivot tables are considered to be the most innovative and powerful analytical feature in Excel by many. ˆ Essentially a dynamic summary report generated from a database. ˆ Automatically extracts, organizes, and summarizes your data, allowing you to see the big picture. Instantly converts a mass of data into a nicely summarized table. ˆ Most innovative aspect: its interactivity. Can rotate (i.e., pivot) the table s row and column headings around the core data area to give you different views of your summarized data. Minor drawback: Unlike a formula-based summary report, a pivot tables does not automatically update when you change the source data. ˆ Solution does exist: A single click of the Refresh button on the PivotTable toolbar forces a pivot table to update and use the latest data. Advantages: ˆ Creating a pivot table takes only a few seconds and doesn t require a single formula. ˆ A single button click is all it takes to convert the data into an interactive pivot chart. Provides a graphical representation of the data in the pivot table. You can use either or both reports to analyze the data, make comparisons, detect patterns and relationships, and discover trends, all while customizing the summary, layout, format, and detail of each report. As an illustration of why to use a pivot table, let s introduce the example data we re going to use throughout this lecture see the Bank Data worksheet of the PvtTblsNChrts.Data.xls workbook. ˆ Consists of daily new-account information for a three-branch bank 1,908 records (rows), representing the new accounts opened in one month. ˆ Each record contains information for the new account that was opened: Date: The date that the account was opened. 1
5 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 2 AcctType: The account type (CD, Checking, Savings, or IRA). Amount: The opening dollar amount. Branch: The branch at which it was opened (Central, Westside, or N. Country). OpenedBy: The type of employee who opened the account (a teller, Teller, or a new-account representative, New Acct). Customer: Whether the account holder is a new customer (New) or an existing customer (Existing). The bank account database clearly contains quite a bit of information, but in its current form the data does not reveal much. It would be a lot more useful in a summarized form, one which possibly answers some questions of interest: ˆ What is the total deposit amount for each branch, broken down by account type? ˆ How many accounts were opened at each branch, broken down by account type? ˆ What s the dollar distribution of the different account types? ˆ What types of accounts do tellers open most often? ˆ Hows does the Central branch compare to the other two branches? ˆ Which branch opens the most accounts for new customers? Generating pivot tables and pivot charts of the bank data will be the quickest and easiest way to summarize the data in order to answer the questions of interest Data appropriate for a pivot table The data that you summarize in a pivot table must start out in the form of a database table. ˆ Can store the database in either a worksheet or an external database file. ˆ The Bank Data worksheet of the PvtTblsNChrts.Data.xls workbook is a good example. Generally speaking, fields in a database table can consist of two types: 1. Data field: Contains a value or data to be summarized usually numeric data. ˆ BANK DATA EXAMPLE: The Amount column. 2. Category field: Describes the data field usually text data. ˆ BANK DATA EXAMPLE: The Date, AcctType, OpenedBy, Branch, and Customer columns they all describe the data in the Amount column. A single database table can have any number of data fields and category fields. ˆ In a pivot table, usually want to summarize one or more of the data fields. ˆ The values in the category fields appear in the pivot table as rows, columns, or pages. However, exceptions exist: ˆ A database that doesn t contain actual numerical data fields. EXAMPLE: Cross-tabulating (i.e., counting frequencies) month born by sex. ˆ A database that contains only a single column of data. EXAMPLE: Frequency distribution (i.e., histogram) of age or state.
6 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Pivot table terminology Perhaps the best way to understand the concept of a pivot table is to see one refer to the pivot table in the Bank Pivot Table Example worksheet of the PvtTblsNChrts.Data.xls workbook to get your bearings. ˆ Column field: A field that has a column orientation in the pivot table. Each item in the field occupies a column. You can have nested column fields. BANK PIVOT TABLE EXAMPLE: AcctType. ˆ Data area: The cells in a pivot table that contain the summary data. Several ways to summarize the data (the sum, average, count, etc. summary functions). BANK PIVOT TABLE EXAMPLE: C10:G19. ˆ Grand totals: A row or column that displays totals for all cells in a row or column in a pivot table. Can specify the grand totals to be calculated for rows, columns, both, or neither. BANK PIVOT TABLE EXAMPLE: Shows grand totals for both rows and columns. ˆ Group: ˆ Item: A collection of items treated as a single item. Can group items manually or automatically (e.g., group dates into months). BANK PIVOT TABLE EXAMPLE: Does not have any defined groups. An element in a field that appears as a row or column header in a pivot table. BANK PIVOT TABLE EXAMPLE: The Branch field has three items: Central, N. County, and Westside. ˆ Page field: A field that has a page orientation in the pivot table similar to a slice of a three-dimensional cube. Can display only one item (or all items) in a page field at one time. BANK PIVOT TABLE EXAMPLE: The Customer field; the pivot table displays the data only for new customers (the user can also select Existing or All from the page field list). ˆ Row field: A field that has a row orientation in the pivot table. Each item in the field occupies a row. Can have nested row fields. BANK PIVOT TABLE EXAMPLE: The Branch and OpenedBy fields. ˆ Source data: The data used to create a pivot table. Can reside in a worksheet or an external database.
7 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 4 BANK PIVOT TABLE EXAMPLE: The Bank Data worksheet of the PvtTblsNChrts.Data.xls workbook. ˆ Subtotals: A row or column that displays subtotals for detail cells in a row or column in a pivot table. BANK PIVOT TABLE EXAMPLE: Shows subtotals for each branch. 1.2 Creating a Pivot Table You create a pivot table using the PivotTable and PivotChart Wizard. ˆ Access the wizard by choosing PivotTable and PivotChart Report from the Data drop-menu. ˆ Then, carry out the steps outlined in the following sections. NOTE: This discussion assumes that you use Excel 2000 or later. The procedure differs slightly in earlier versions of Excel Step 1: Specifying the data location The first dialog box presented by the PivotTable and PivotChart Wizard prompts you to identify the source of your data. ˆ Choose the type of data you will use under Where is the data you want to analyze?. Microsoft Excel list or database (i.e., data from a Microsoft Excel worksheet). * Data should be in a list format, with column labels in the first row, the rest of the rows having similar items in the same column, and no blank rows or columns within the range of data. * The Bank Data example in this lecture is a worksheet database. External data sources (e.g., databases, text files, and sites on the Internet; a spreadsheet or data table imported from another program). Multiple consolidation ranges (e.g. combining multiple areas on a worksheet). Another PivotTable report or PivotChart report. NOTE: You will see different dialog boxes while you work through the wizard depending on the source of the data that you want to analyze. ˆ The following sections present the wizard s dialog boxes for data sourced from an Excel list or database. Practice Exercise: Start the PivotTable and PivotChart Wizard and select Microsoft Excel list or database under Where is the data you want to analyze?. ˆ We will be creating a pivot table for the bank data see the Bank Data worksheet of the Pvt- TblsNChrts.Data.xls workbook. Click the Next button to move on to Step 2 of the wizard.
8 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Step 2: Specifying the data Step 2 of the PivotTable and PivotChart Wizard prompts you for the range of the data. TIP: If you place the cell pointer anywhere within the worksheet database when you start the PivotTable and PivotChart Wizard, Excel identifies the database range automatically. ˆ Otherwise, click and drag across the cells you wish to use. ˆ Use the Browse button to open a different workbook and select a range. Recall, a pivot table does not automatically update when your source data changes the source data. ˆ Solution: Once your pivot table is created, click the Refresh button on the PivotTable toolbar to update the pivot table and use the latest data. Practice Exercise: In Step 2 of the wizard, make sure all of the bank data has been selected Bank Data!$A$1:$F$1909. Click the Next button to move on to Step 3 of the wizard Step 3: Completing the pivot table In the final step of the PivotTable and PivotChart Wizard, you specify the location to create the pivot table. ˆ Choose the location under Where do you want to put the PivotTable report?. New worksheet: Excel inserts a new worksheet for the pivot table. Existing worksheet: The pivot table appears on the current worksheet (you can specify the starting cell location). At this point, you can click the Options button to select some options that determine how the table appears. ˆ Can set these options at any time after you create the pivot table, so you do not need to do so before creating the pivot table. ˆ See the Pivot table options subsection for more details. Once you ve selected the location of the pivot table, you can set up the actual layout of the pivot table by using either of two techniques: ˆ Click the Layout button to use a dialog box to lay out the pivot table. ˆ OR Click the Finish button to create a blank pivot table and then use the PivotTable Field List toolbar to lay out the pivot table Using a dialog box to lay out the pivot table When you click the Layout button in Step 3 of the wizard, a Layout dialog box is opened. ˆ The fields in the database appear as buttons along the right side of the dialog box. ˆ Simply drag the buttons to the appropriate area of the pivot table diagram (which appears in the center of the dialog box). Drag the fields that you want to use as row fields onto the ROW area in the diagram.
9 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 6 Drag the fields that you want to use as column fields onto the COLUMN area in the diagram. Drag the fields that contain the data that you want to summarize onto the DATA area of the diagram. Drag the fields that you want to use as page fields onto the PAGE area of the diagram. NOTE: For versions prior to Excel 2000, this dialog box appears as Step 3 of the wizard. For these versions, using the Layout dialog box is the only way to lay out a pivot table. You can drag as many field buttons as you want to any of these locations, and you don t have to use all the fields. ˆ Any fields that you don t use simply don t appear in the pivot table. ˆ Some fields can only be used in some of the areas; if you drop a field in an area where it can t be used, the field won t appear in the area. ˆ To rearrange the fields, drag them from one area to another. ˆ To remove a field, drag it out of the diagram. When you drag a field button to the Data area, the PivotTable and PivotChart Wizard applies the Sum summary function if the field contains numeric values; it applies the Count summary function if the field contains non-numeric values (i.e., text). ˆ While you set up the pivot table, you can double-click a field button to choose the summary function. See the Customizing a Pivot Table section for more details. Practice Exercise: Define the layout of the pivot table to answer the following question: What is the total deposit amount for each branch, broken down by account type and customer? ˆ ROW: AcctType. ˆ COLUMN: Customer. ˆ DATA: Amount. ˆ PAGE: Branch. The row field and column fields could be interchanged if desired. When you are satisfied with the layout, click OK, and then click the Finish button in the PivotTable and PivotChart Wizard Using the PivotTable Field List toolbar to lay out the pivot table You may prefer to lay out your pivot table directly in the worksheet, using the PivotTable Field List toolbar. ˆ Closely resembles the technique just described, because you still drag and drop fields. ˆ In this case, you drag the fields from a toolbar into the worksheet. NOTE: You cannot use this technique with versions prior to Excel Also, note that Excel 2000 doesn t have a PivotTable Field List toolbar. Rather, the fields are displayed as buttons on the PivotTable toolbar. As mentioned, once you ve selected the location of the pivot table in Step 3 of the wizard, click the Finish button to create a blank pivot table.
10 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 7 ˆ The template provides you with hints about where to drop various types of fields. ˆ If you don t see the field list, click within the outlines of the pivot table drop areas, and make sure the Show Field List toggle button is depressed on the PivotTable toolbar (the last toggle button to the right). ˆ Drag and drop fields from the PivotTable Field List toolbar onto the template. Drag the fields that you want to use as row fields to the area labeled Drop Row Fields Here in the template. Drag the fields that you want to use as column fields to the area labeled Drop Column Fields Here in the template. Drag the fields that contain the data that you want to summarize to the area labeled Drop Data Items Here in the template. Drag the fields that you want to use as page fields to the area labeled Drop Page Fields Here in the template. ˆ OR Select the field name, choose the location from the drop-down list, and click the Add To button. ˆ All fields remain on the PivotTable Field List toolbar, even if you don t use them. ˆ To rearrange the fields, drag them from one area to another. ˆ To remove a field, drag it out of the pivot table. Excel continues to update the pivot table as you add or remove fields. method easiest to use if you drag and drop data items last. For this reason, you ll find this ˆ Set up the field items and then specify the data to summarize. As before, when you drag a field button to the Drop Data Items Here area, the PivotTable and PivotChart Wizard applies the Sum summary function if the field contains numeric values; it applies the Count summary function if the field contains non-numeric values (i.e., text). ˆ While you set up the pivot table, you can double-click a field button to choose the summary function. See the Customizing a Pivot Table section for more details. Practice Exercise: technique. Define the same layout of the pivot table using the PivotTable Field List toolbar ˆ ROW: AcctType. ˆ COLUMN: Customer. ˆ DATA: Amount. ˆ PAGE: Branch. The row field and column field could be interchanged if desired. When you are satisfied with the layout, click a cell outside the pivot table template.
11 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Customizing a Pivot Table Pivot table options Excel provides plenty of options that determine how your pivot table looks and works. options via the PivotTable Options dialog box: To access these ˆ Click the Options button in the Step 3 of the PivotTable and PivotChart Wizard. ˆ OR Once you ve created the pivot table, right-click any cell in the pivot table and then select Table Options from the shortcut menu. The following options are available in the PivotTable Options dialog box: ˆ Name: You can provide a name for the pivot table. PivotTable1, PivotTable2, and so on. Excel provides default names in the form of ˆ Format options. Grand totals for columns: Check this box if you want Excel to calculate grand totals for items displayed in columns. Grand totals for rows: Check this box if you want Excel to calculate grand totals for items displayed in rows. AutoFormat table: Check this box if you want Excel to apply one of its AutoFormats to the pivot table. Excel uses the AutoFormat even if you rearrange the table layout. Subtotal hidden page items: Check this box if you want Excel to include hidden items in the page fields in the subtotals. Merge labels: Check this box if you want Excel to merge the cells for outer row and column labels. Doing so may make the table more readable. Preserve formatting: Check this box if you want Excel, when it updates the pivot table, to keep any formatting that you applied. Repeat item labels on each printed page: Check this box to set row titles that appear on each page when you print a pivot table. Mark Total with *: Available only if you generated the pivot table from an OLAP data source. If checked, displays an asterisk after every subtotal and grand total to indicate that these values include any hidden items as well as displayed items. Page layout: You can specify the order in which you want the page fields to appear. Fields per column: You can specify the number of page fields to show before starting another row of page fields. For error values, show: You can specify a value to show for pivot table cells that display an error. For empty cells, show: You can specify a value to show for empty pivot table cells. Set print titles: Check this box to set column titles that appear at the top of each page when you print a pivot table. ˆ Data options. Save data with table layout: If you check this option, Excel stores an additional copy of the data (called a pivot table cache), enabling Excel to recalculate the table more quickly when you change the layout. If memory is an issue, you should keep this option unchecked (which slows updating a bit). Enable drill to details: If checked, you can double-click a cell in the pivot table to view the records that contributed to the summary value.
12 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 9 Refresh on open: If checked, the pivot table refreshes whenever you open the workbook. Refresh every x minutes: If you are connected to an external database, you can specify how often you want the pivot table refreshed while the workbook is open. Save password: If you use an external database that requires a password, you can store the password as part of the query so that you don t have to reenter it. Background query: If checked, Excel runs the external database query in the background while you continue your work. Optimize memory: This option reduces the amount of memory used when you refresh an external database query Changing how the pivot table data is summarized Another way to customize your pivot table is to change how the pivot table data is summarized. ˆ Referring to the field(s) summarized in the data area of the pivot table. ˆ By default, Excel applies the Sum summary function if the data field contains numeric values, and the Count summary function if the data field contains text (i.e., non-numeric values). The complete list of summary functions you can choose from is: Function Summarizes... Sum The sum of the values; default function for numeric data. Count The number of data values; default function for data non-numeric data. Works the same as the COUNTA worksheet function. Average The average of the values. Max The largest value. Min The smallest value. Product The product of the values. Count Nums The number of data values that are numbers. Works the same as the COUNT worksheet function. StdDev An estimate of the standard deviation of a population, where the sample is a subset of the entire population. StDevp The standard deviation of a population, where the population is all of the data to be summarized. Var An estimate of the variance of a population, where the sample is a subset of the entire population. Varp The variance of a population, where the population is all of the data to be summarized. To change the function used to summarize the data in a pivot table: 1. In the pivot table, select the data field (i.e. Sum of Amount ) or a cell in the data area. 2. On the PivotTable toolbar, click the Field Settings button (second from the right) to open the PivotTable Field dialog box. ˆ OR right-click the data field or data area cell and choose Field Settings from the shortcut menu. 3. In the Summarize by box, choose the desired summary function. 4. Click OK when finished. You can also use a custom calculation to further define the summary function. The available custom calculations are:
13 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 10 Function Result Difference From Displays data as the difference from the value of the Base item in the Base field. % Of Displays data as a percentage of the value of the Base item in the Base field. % Difference From Displays data as the percentage difference from the value of the Base item in the Base field. Running Total in Displays the data for successive items in the Base field as a running total. % Of Row Displays the data in each row or category as a percentage of the total for the row or category. % Of Column Displays the data in each column or series as a percentage of the total for the column or series. % Of Total Displays data as a percentage of the grand total of all the data or data points in the report. Index Calculates data as follows: ((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total)) To incorporate a custom calculation into the function used summarize the data in a pivot table: 1. Perform steps 1 through 3 of changing the function used to summarize the data in a pivot table. 2. In the PivotTable Field dialog box, click the Options button to expand the dialog box. 3. Click the calculation you want in the Show data as list. ˆ Setting Show data as to Normal turns off any custom calculation. 4. Click OK when finished. If the pivot table has multiple data fields, repeat these steps for each one that you want to change. ˆ Can use more than one summary method for the same field. Drag the field from the PivotTable Field List window to the data area a second time, and then repeat the steps above for the second instance of the field see Practice Exercise 2. Use the Number button in the PivotTable Field dialog box to format the data area cell values, including the number of decimal places to show. As mentioned before, the calculations and options available in a pivot table depend on whether the source data came from an OLAP database or elsewhere. Practice Exercise: ˆ Exercise 1: Customize the created Bank Data pivot table to summarize the average deposit amount for each branch, broken down by account type and customer. Change the summary function from Sum to Average. Use the Number button to format the data area cells as Currency (dollars, $) with two decimal places. ˆ Exercise 2: Create a new pivot table to summarize the frequency (both count and % of total) of accounts opened at each branch, broken down by account type Generate the pivot table based on the following layout: * ROW: AcctType. * COLUMN: Branch.
14 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS 11 * DATA: Amount. * PAGE: None. The row field and column field could be interchanged if desired. For the Amount data field, in the PivotTable Field dialog box: * Change the Name from Sum of Amount to No. of Accounts. * Change the summary function from Sum to Count. * Click OK. Using the PivotTable Field List, drag the Amount field to the data area of the pivot table a second time. For the second Amount data field, in the PivotTable Field dialog box: * Change the Name from Sum of Amount to % of Accounts. * Change the summary function from Sum to Count. * Click the Options button, and choose % of total from the Show data as drop box. * Click OK Grouping pivot table items One of the more useful features of a pivot table is the ability to combine items into groups. To group items in a pivot table: ˆ Select them, right-click, and choose Group from Group and Show Detail in the shortcut menu. Makes most sense, when a field contains dates. ˆ Can create groups automatically by month, quarter, and year. ˆ EXAMPLE DATA: The Mileage Data worksheet of the PvtTblsNChrts.Data.xls workbook contains a simple database table with two fields: Date and Mileage. Contains weekly mileage data for four years (210 data points). Goal: Summarize the mileage data by month. Practice Exercise: Using the data in the Mileage Data worksheet of the PvtTblsNChrts.Data.xls workbook, create a pivot table to summarize mileage by month. ˆ Generate the pivot table based on the following layout: ROW: Date. COLUMN: None. DATA: Mileage. PAGE: None. ˆ Group the dates by month: Open the Grouping dialog box by right-clicking the Date heading and selecting Group from Group and Show Detail in the shortcut menu. In the list box, select Months and Years using the Ctrl key, and verify that the starting and ending dates are correct. * NOTE: If you select only Months in the Grouping list box, months in different years combine i.e., the June item would display mileage data for June of all four years. Click OK.
15 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Converting a pivot table to a standard range of cells A pivot table is a special type of object, and you cannot perform many standard range operations with it. ˆ EXAMPLE: Can t insert a new row or enter formulas within a pivot table. If you want to manipulate a pivot table in ways not normally permitted and no longer need its interactivity, you can convert it to a standard range of cells by copying it: 1. Select the table (or the part that you re interested in) and choose Copy from the Edit drop-menu. 2. Activate a new worksheet and choose Paste Special from the Paste drop-menu. 3. Select the Values option and click OK. KEEP IN MIND: The copied information is no longer linked to the source data, and cannot be refreshed. ˆ If the source data changes, your copied pivot table does not reflect those changes. 1.4 Creating a pivot chart There are several ways to create a pivot chart: 1. Create a pivot chart from an existing pivot table: (a) Make a default chart in one step. ˆ Select any cell in the pivot table, and then click the Chart Wizard button in either the PivotTable toolbar or the Standard toolbar the pivot chart is always created on a new chart sheet. Alternatively, can right-click any cell in the pivot table and choose PivotChart from the shortcut menu. OR Select any cell in the pivot table and press F11. (b) OR Use the Chart Wizard to create a customized chart. i. Click a cell outside and not adjacent to the pivot table. ii. Click the Chart Wizard button on the Standard toolbar. iii. In Step 1 Chart Type of the wizard, choose any chart type except XY (Scatter), bubble, or stock. iv. In Step 2 Chart Source Data of the wizard, click anywhere in the pivot table the reference in the Data range box will expand to include the entire table. v. Follow the instructions in the remaining Chart Wizard steps. 2. Create a pivot chart report from the source data. ˆ Recall, the first step of the PivotTable and PivotChart Wizard contains an option that enables you to create a pivot chart at the same time as the pivot table. Choose PivotChart report (with PivotTable report) under What kind of report do you want to create?. Practice Exercise: Using any of the methods mentioned, create a pivot chart of the mileage data pivot table created in the Grouping pivot table items subsections Practice Exercise.
16 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Understanding pivot charts It s important to understand that a pivot chart is essentially a graphical representation of a pivot table, and the two items are linked together. ˆ A pivot chart always shows exactly the same data that s displayed in its corresponding pivot table. ˆ If you change the pivot chart, the pivot table also changes and vice versa. When comparing a pivot table with its corresponding pivot chart, you ll notice the following: ˆ All the field buttons present in the pivot table are also present in the pivot chart. Furthermore, the setting for each field button is identical. Usually no need to display the pivot chart field buttons if you need to change the layout or adjust the data, you can do so in the corresponding pivot table. To hide pivot chart field buttons: Right-click any one of the field buttons and then choose Hide PivotChart Field Buttons from the shortcut menu. To re-display the hidden field buttons: Click the PivotChart drop-down button on the PivotTable toolbar and select Hide PivotChart Field Buttons this menu item is a toggle. ˆ The Page field button appears in the upper left corner in the pivot table and the pivot chart. ˆ Each pivot table data column appears as a separate data series in the pivot chart. ˆ Total and subtotal rows and columns in the pivot table do not appear in the pivot chart. ˆ The Column field buttons correspond to the legend in the pivot chart. ˆ The Row field buttons in the pivot table appear below the category axis in the pivot chart. To unlink a pivot chart from its pivot table, create the chart from an unlinked pivot table. ˆ See the Converting a pivot table to a standard range of cells subsection for more details. You ll also notice that pivot charts differ from standard charts in a number of ways: ˆ Pivot charts contain field buttons, which are used to change the layout or data used in the pivot chart. Standard charts do not have field buttons. ˆ A pivot chart is always created on a chart sheet. After the chart is created however, you can convert it to an embedded chart. ˆ When you create a pivot chart, Excel ignores the default chart type. A pivot chart always start out as a stacked-column chart. After the pivot chart is created, you can change it to any other chart type except XY (Scatter), stock, or bubble. ˆ Standard charts are linked directly to worksheet cells. Data used by a pivot chart is linked to a pivot table. Unlike a standard chart, you cannot changed the data source used by a pivot chart. ˆ You cannot change the series plot order for a pivot chart. You can however, drag the series labels in the pivot table to change the order in which the data appears in the pivot chart. ˆ Many formatting changes applied to a pivot chart are lost when the chart is refreshed. A standard chart always maintains the formatting you apply. ˆ In a pivot chart, you cannot move or resize the plot area or titles. In addition, you cannot move the legend manually although you can choose from among the present positions.
17 SECTION 1. PIVOTTABLE AND PIVOTCHART REPORTS Summary Here s a helpful outline to follow when creating pivot tables and pivot charts: 1. Organize your data. 2. Know what you want to do with your data. ˆ Put what you want in the form of a question. 3. Let the PivotTable and PivotChart Wizard lead the way. 4. Assemble the pivot table. 5. Keep experimenting until you like what you see. ˆ Playing with your data is half the secret to creating great pivot tables and pivot charts because you can choose and rechoose the data items you want to show, and reorder and redisplay them, you can display your information in numerous ways until it shows what you want to see in the best, most accurate way. 6. Create a pivot chart.
18 Section 2 Automating Tasks With Macros 2.1 Introduction If you perform a task repeatedly in Microsoft Excel, you can automate the task with a macro. ˆ A series of commands and functions that are stored in a Microsoft Visual Basic module and can be run whenever you need to perform the task. Visual Basic for Applications (VBA) is Excel s macro programming language. ˆ Can speed up any common editing sequence you may execute in an Excel spreadsheet. ˆ EXAMPLE: If you often enter long text strings in cells, you can create a macro to format those cells so that the text wraps. When you record a macro, Excel stores information about each step you take as you perform a series of commands. You then run the macro to repeat, or play back, the commands. ˆ If you make a mistake when you record the macro, corrections you make are also recorded. ˆ Visual Basic stores each macro in a new module attached to a workbook. You can run a macro by choosing it from a list in the Macro dialog box. ˆ Can also make a macro run whenever you click a particular button or press a particular key combination by assigning the macro to a toolbar button, a keyboard shortcut, or a graphic object on a worksheet. Not covered in this lecture. After you record a macro, you can view the macro code with the Visual Basic Editor to correct errors or change what the macro does. ˆ A program designed to make writing and editing macro code easy for beginners, and provides plenty of online help. ˆ Don t have to learn how to program or use the Visual Basic language to make simple changes to your macros can edit macros, copy macros from one module to another, copy macros between different workbooks, rename the modules that store the macros, or rename the macros. ˆ EXAMPLE: If you wanted the text-wrapping macro to also make the text bold, you could record another macro to make a cell bold and then copy the instructions from that macro to the text-wrapping macro. 15
19 SECTION 2. AUTOMATING TASKS WITH MACROS 16 ˆ Not covered in this lecture. Excel also provides safeguards against viruses that can be transmitted by macros. ˆ If you share macros with others, can certify them with a digital signature so that other users can verify that they are from a trustworthy source. ˆ Whenever you open a workbook that contains macros, can verify their source before enabling them. See the following source for more detail regarding macros and using VBA: ˆ Chapters of Walkenbach s Excel Charts. ˆ The Automating Tasks section of the Microsoft Excel Help under the Contents tab. 2.2 Recording a Macro To record a macro: 1. On the Tools drop-menu, point to Macro, and then click Record New Macro. 2. Name the macro in the Macro name field. ˆ The first character of the macro name must be a letter. ˆ Other characters can be letters, numbers, or underscore characters spaces are not allowed. ˆ Do not use a macro name that is also a cell reference or you can get an error message that the macro name is not valid. 3. If you would like to assign a shortcut key to the macro for easy use, enter the letter under Shortcut key. ˆ Enter a lower case letter to assign a CTRL+letter shortcut key. ˆ Enter an upper case letter to assign a CTRL+SHIFT+letter shortcut key. ˆ The shortcut key letter you use cannot be a number or special character such or #. ˆ The shortcut key will override any equivalent default Excel shortcut keys while the workbook that contains the macro is open. 4. In the Store macro in box, click the location where you want to store the macro. ˆ If you want a macro to be available whenever you use Excel, select Personal Macro Workbook. 5. If you want to include a description of the macro, type it in the Description box for your reference only so you remember what the macro does. 6. Click OK when you are ready to start recording. 7. Carry out the actions you want to record. ˆ Select options from the drop down menus and Excel will record the options you choose from the dialog boxes. ˆ Toggle actions, such as choosing Toolbars from the View drop-menu, that have no effect on the worksheet will not be recorded. 8. When you are done, click the Stop Recording button on the Stop Recording toolbar. Practice Exercise: In the Bank Data worksheet of the PvtTblsNChrts.Data.xls workbook, record the following actions as a macro name it Print Setup.
20 SECTION 2. AUTOMATING TASKS WITH MACROS Choose Page Setup from the File drop-menu. 2. In the Margins tab, check Horizontally under Center on page. 3. In the Header/Footer tab, click Custom Header. ˆ In the Center Section, format the header to be workbook, (a) Click the File name button (fourth button from the right). (b) Type workbook,. (c) Click the Sheet name button (third button from the right). (d) Type worksheet. (e) Click OK. 4. In the Header/Footer tab, click Custom Footer. ˆ In the Center Section, format the footer to be Page of. (a) Type Page. (b) Click the Page number button (second button from the left). (c) Type of. (d) Click the Total pages button (third button from the left). (e) Click OK. 5. In the Sheet tab, specify row 1 as the Rows to repeat at top field. 6. Check Gridlines and Row and Column Headings under Print. 7. Click OK. worksheet. 2.3 Running a Macro To run a macro: 1. If it s not already open, open the workbook that contains the macro. 2. On the Tools menu, point to Macro, and then click Macros. 3. From the Macros dialog box, highlight the Macro name in the list and click Run. ˆ If you want to interrupt the macro while it is running, press the Escape key. ˆ If the macro is long and you want to stop it while it is running, press BREAK (hold the Ctrl key and press PAUSE). Practice Exercise: Run the Print Setup macro on the Mileage Data worksheet of the PvtTblsNChrts.Data.xls workbook view the result using Print Preview from the Print drop-menu.
Page 1 of 8 Excel Home > PivotTable reports and PivotChart reports > Basics Overview of PivotTable and PivotChart reports Show All Use a PivotTable report to summarize, analyze, explore, and present summary
Microsoft Excel 2010 Pivot Tables Email: firstname.lastname@example.org Web Page: http://training.health.ufl.edu Microsoft Excel 2010: Pivot Tables 1.5 hours Topics include data groupings, pivot tables, pivot
What you will do: Explore the features of Excel 2002 Create a blank workbook and a workbook from a template Format a workbook Apply formulas to a workbook Create a chart Import data to a workbook Share
Overview A PivotTable report is an interactive table that allows you to quickly group and summarise information from a data source. You can rearrange (or pivot) the table to display different perspectives
MICROSOFT EXCEL 2010 ANALYZE DATA Microsoft Excel 2010 Essential Analyze data Last Edited: 2012-07-09 1 Basic analyze data... 4 Use diagram to audit formulas... 4 Use Error Checking feature... 4 Use Evaluate
The Company Rocks Excel 2003 PivotTables Summarizing, Analyzing, and Presenting Step-by-step instructions to accompany video lessons Danny Rocks 5/19/2011 Creating PivotTables in Excel 2003 PivotTables
Overview A PivotTable report is an interactive table that allows you to quickly group and summarise information from a data source. You can rearrange (or pivot) the table to display different perspectives
An Introduction to Excel Pivot Tables EXCEL REVIEW 2001-2002 This brief introduction to Excel Pivot Tables addresses the English version of MS Excel 2000. Microsoft revised the Pivot Tables feature with
Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP Consolidate Data in Multiple Worksheets Example data is saved under Consolidation.xlsx workbook under ProductA through ProductD
Produced by Flinders University Centre for Educational ICT PivotTables Excel 2010 CONTENTS Layout... 1 The Ribbon Bar... 2 Minimising the Ribbon Bar... 2 The File Tab... 3 What the Commands and Buttons
ACADEMIC TECHNOLOGY SUPPORT Microsoft Excel: Tables & Pivot Tables email@example.com 439-8611 www.etsu.edu/ats Table of Contents: Overview... 1 Objectives... 1 1. What is an Excel Table?... 2 2. Creating Pivot
Formulas & Functions in Microsoft Excel Theresa A Scott, MS Biostatistician III Department of Biostatistics Vanderbilt University firstname.lastname@example.org Table of Contents 1 Introduction 1 1.1 Using
Page 1 of 5 Excel Home > PivotTable reports and PivotChart reports > Basics Create or delete a PivotTable or PivotChart report Show All To analyze numerical data in depth and to answer unanticipated questions
Excel Pivot Tables 1 Table of Contents Pivot Tables... 3 Preparing Data for a Pivot Table... 3 Creating a Dynamic Range for a Pivot Table... 3 Creating a Pivot Table... 4 Removing a Field... 5 Change the
Excel Database Management Microsoft Reference Guide University Technology Services Computer Training Copyright Notice Copyright 2003 EBook Publishing. All rights reserved. No part of this publication may
NDUS Training and Documentation Analyzing Excel Data Using Pivot Tables Pivot Tables are interactive worksheet tables you can use to quickly and easily summarize, organize, analyze, and compare large amounts
This tutorial was adapted from a tutorial by see its complete version at http://www.fgcu.edu/support/office2000/excel/index.html Excel 2003 Tutorial I Spreadsheet Basics Screen Layout Title bar Menu bar
Table of Contents Elements of An Excel Document... 2 Resizing and Hiding Columns and Rows... 3 Using Panes to Create Spreadsheet Headers... 3 Using the AutoFill Command... 4 Using AutoFill for Sequences...
The Basics of Microsoft Excel Theresa A Scott, MS Biostatistician III Department of Biostatistics Vanderbilt University email@example.com Table of Contents 1 Introduction 1 1.1 Spreadsheet Basics..........................................
Background Vocabulary Excel Project Creating a Stock Portfolio Simulation 1. What is a stock? A stock is a share in the ownership of a corporation, a large business organization. A stock, also, represents
CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Microsoft Excel 2010 Part 3: Advanced Excel Winter 2015, Version 1.0 Table of Contents Introduction...2 Sorting Data...2 Sorting
Excel Working with Data Lists Excel Working with Data Lists Princeton University COPYRIGHT Copyright 2001 by EZ-REF Courseware, Laguna Beach, CA http://www.ezref.com/ All rights reserved. This publication,
Intro to Excel spreadsheets What are the objectives of this document? The objectives of document are: 1. Familiarize you with what a spreadsheet is, how it works, and what its capabilities are; 2. Using
Microsoft Excel: Pivot Tables Pivot Table Reports A PivotTable report is an interactive table that you can use to quickly summarize large amounts of data. You can rotate its rows and columns to see different
CHAPTER Using PivotTables and PivotCharts In this chapter How PivotTable and PivotChart Reports Work 838 When Should You Use a PivotTable? 842 Creating a PivotTable 842 Editing and Updating a PivotTable
CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS An Excel Pivot Table is an interactive table that summarizes large amounts of data. It allows the user to view and manipulate
Formulas & Functions in Microsoft Excel Theresa A Scott, MS Biostatistician II Department of Biostatistics Vanderbilt University firstname.lastname@example.org Table of Contents 1 Introduction 1 1.1 Using
Basic Pivot Tables Pivot tables summarize data in a quick and easy way. In your job, you could use pivot tables to summarize actual expenses by fund type by object or total amounts. Make sure you do not
A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc. 2012 Advanced Excel TeachUcomp, Inc. it s all about you Copyright: Copyright 2012 by TeachUcomp, Inc. All rights reserved. This publication,
Pivot Tables & Pivot Charts Pivot tables... 2 Creating pivot table using the wizard...2 The pivot table toolbar...5 Analysing data in a pivot table...5 Pivot Charts... 6 Creating a pivot chart using the
Excel 2010: Create your first spreadsheet Goals: After completing this course you will be able to: Create a new spreadsheet. Add, subtract, multiply, and divide in a spreadsheet. Enter and format column
How to Use a Data Spreadsheet: Excel One does not necessarily have special statistical software to perform statistical analyses. Microsoft Office Excel can be used to run statistical procedures. Although
Using Excel in Research Hui Bian Office for Faculty Excellence Data entry in Excel Directly type information into the cells Enter data using Form Command: File > Options 2 Data entry in Excel Tool bar:
CHAPTER Retrieving Data from OLAP Servers In this chapter What Is OLAP? 790 by Timothy Dyck and John Shumate email@example.com, firstname.lastname@example.org Server Versus Client OLAP 791 Creating an OLAP
1 Microsoft Excel 2010 Tutorial Excel is a spreadsheet program in the Microsoft Office system. You can use Excel to create and format workbooks (a collection of spreadsheets) in order to analyze data and
3 What s New in Excel 2007 3.1 Overview of Excel 2007 Microsoft Office Excel 2007 is a spreadsheet program that enables you to enter, manipulate, calculate, and chart data. An Excel file is referred to
EXCEL FINANCIAL USES Table of Contents Page LESSON 1: FINANCIAL DOCUMENTS...1 Worksheet Design...1 Selecting a Template...2 Adding Data to a Template...3 Modifying Templates...3 Saving a New Workbook as
Creating and Using Forms in SharePoint Getting started with custom lists... 1 Creating a custom list... 1 Creating a user-friendly list name... 1 Other options for creating custom lists... 2 Building a
Crystal Reports Level 2 Computer Training Solutions Course Outline 1. Creating Running Totals Create a Running Total Field Modify a Running Total Field Create a Manual Running Total on Either Detail Data
A Beginning Guide to the Excel 2007 Pivot Table Paula Ecklund Summer 2008 Page 1 Contents I. What is a Pivot Table?...1 II. Basic Excel 2007 Pivot Table Creation Source data requirements...2 Pivot Table
USING WINDOWS 8 UNIT 1: INTRODUCTION TO COMPUTERS Topic A: Overview of computers Topic B: How computers work Topic C: Starting the computer UNIT 2: INPUT DEVICES Topic A: Mouse and keyboard basics Topic
STATEMENT OF TRANSACTION REPORT ANALYSIS USING EXCEL Excel can be used to analyze the MCPS Statement of Transaction EXCEL Report Selected Fields to more easily track expenses through the procurement cycle.
University of Wisconsin-Extension Cooperative Extension Madison, Wisconsin PD &E Program Development & Evaluation Using Excel for Analyzing Survey Questionnaires Jennifer Leahy G3658-14 Introduction You
Migrating to Excel 2010 - Excel - Microsoft Office 1 of 1 In This Guide Microsoft Excel 2010 looks very different, so we created this guide to help you minimize the learning curve. Read on to learn key
A Quick Tour of F9 1 Table of Contents I. A Quick Tour of F9... 3 1. Getting Started... 3 2. Quick Trial Balance... 7 3. A More Dynamic Table Report... 10 II. The Fundamental F9 Formula... 14 The GL Formula...
Ribbon menu The Ribbon menu system with tabs for various Excel commands. This Ribbon system replaces the traditional menus used with Excel 2003. Above the Ribbon in the upper-left corner is the Microsoft
Chapter 4 Displaying and Describing Categorical Data Chapter Goals Learning Objectives This chapter presents three basic techniques for summarizing categorical data. After completing this chapter you should
M o s t U s e f u l E x c e l C o m m a n d s Tommy B. Harrington 104 Azalea Drive Greenville, NC 27858 Email: email@example.com Computer Training YOU Can Understand! Most Useful Excel Commands
Advanced Excel Data Validation Excel has a feature called Data Validation, which will allow you to control what kind of information is typed into cells. 1. Select the cell(s) you wish to control. 2. Click
BID2WIN Workshop Advanced Report Writing Please Note: Please feel free to take this workbook home with you! Electronic copies of all lab documentation are available for download at http://www.bid2win.com/userconf/2011/labs/
Getting Started Guide SAGE ACCPAC INTELLIGENCE Table of Contents Introduction... 1 What is Sage Accpac Intelligence?... 1 What are the benefits of using Sage Accpac Intelligence?... 1 System Requirements...
Macros in Word & Excel Description: If you perform a task repeatedly in Word or Excel, you can automate the task by using a macro. A macro is a series of steps that is grouped together as a single step
COMMUNITY TECHNICAL SUPPORT Microsoft Excel Basics Introduction to Excel Click on the program icon in Launcher or the Microsoft Office Shortcut Bar. A worksheet is a grid, made up of columns, which are
Appendix 2.1 Tabular and Graphical Methods Using Excel 1 Appendix 2.1 Tabular and Graphical Methods Using Excel The instructions in this section begin by describing the entry of data into an Excel spreadsheet.
Centre for Learning and Academic Development (CLAD) Technology Skills Development Team MS Excel as a Database http://intranet.birmingham.ac.uk/itskills Using MS Excel as a Database (XL2103) Author: Sonia
Pastel Evolution BIC Getting Started Guide Table of Contents System Requirements... 4 How it Works... 5 Getting Started Guide... 6 Standard Reports Available... 6 Accessing the Pastel Evolution (BIC) Reports...
Analyzing Data Using Excel What you will do: Create a spreadsheet Use formulas and basic formatting Import text files Save worksheets as web pages Add interactivity to web worksheets Use pivot tables Create
Using Excel as a Management Reporting Tool with your Minotaur Data with Judith Kirkness These instruction sheets will help you learn: 1. How to export reports from Minotaur to Excel (these instructions
Information Technology MS Access 2007 Users Guide ACCESS 2007 Importing and Exporting Data Files IT Training & Development (818) 677-1700 firstname.lastname@example.org TABLE OF CONTENTS Introduction... 1 Import Excel
Excel 2003 Instructions Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals contains extensive instructions for using Excel 2010 and Excel for Mac 2011. There are a few instances
Open Crystal Reports From the Windows Start menu choose Programs and then Crystal Reports. Creating a Blank Report Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick
BUSINESS DATA ANALYSIS WITH PIVOTTABLES Jim Chen, Ph.D. Professor Norfolk State University 700 Park Avenue Norfolk, VA 23504 (757) 823-2564 email@example.com BUSINESS DATA ANALYSIS WITH PIVOTTABLES INTRODUCTION
1 of 17 New Orleans 2007 Workshop Tips For Using Microsoft Excel to Analyze EMSC Data and Generate Reports Pivot Tables and Other Goodies Introduction In this document, we will describe several more advanced
Data exploration with Microsoft Excel: univariate analysis Contents 1 Introduction... 1 2 Exploring a variable s frequency distribution... 2 3 Calculating measures of central tendency... 16 4 Calculating
Introduction to Microsoft Access 2003 Zhi Liu School of Information Fall/2006 Introduction and Objectives Microsoft Access 2003 is a powerful, yet easy to learn, relational database application for Microsoft
Sage Intelligence Report Designer Add-In Q: What is Sage Intelligence Reporting? A: Sage Intelligence Reporting helps you to easily control, automate and analyze your data to make better informed decision,
3 RETRIEVING ISERIES DATA WITH MICROSOFT QUERY Microsoft Query, the helper application included with Microsoft Office, allows Office applications such as Word and Excel to read data from ODBC data sources.
Page 1 of 8 Excel 2010 Home > Excel 2010 Help and How-to > Getting started with Excel Search help More on Office.com: images templates Basic tasks in Excel 2010 Here are some basic tasks that you can do
Excel Spreadsheets: Getting Started EXCEL REVIEW 2003-2004 Excel Spreadsheets: Getting Started Review this guide for tips on some of the basic skills you need to get started building and using spreadsheets.
Basic Microsoft Excel 2007 The biggest difference between Excel 2007 and its predecessors is the new layout. All of the old functions are still there (with some new additions), but they are now located
How to Use Excel for Law Firm Billing FEATURED FACULTY: Staci Warne, Microsoft Certified Trainer (MCT) (801) 463-1213 firstname.lastname@example.org Staci Warne, Microsoft Certified Trainer (MCT) Staci Warne
Excel Microsoft Office s spreadsheet application can be used to track and analyze numerical data for display on screen or in printed format. Excel is designed to help you record and calculate data, and
Using Pivot Tables in Microsoft Excel 2003 Introduction A Pivot Table is the name Excel gives to what is more commonly known as a cross-tabulation table. Such tables can be one, two or three-dimensional
MICROSOFT ACCESS 2003 TUTORIAL M I C R O S O F T A C C E S S 2 0 0 3 Microsoft Access is powerful software designed for PC. It allows you to create and manage databases. A database is an organized body
INTRODUCTION TO EXCEL 1 INTRODUCTION Anyone who has used a computer for more than just playing games will be aware of spreadsheets A spreadsheet is a versatile computer program (package) that enables you
Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix Jennifer Clegg, SAS Institute Inc., Cary, NC Eric Hill, SAS Institute Inc., Cary, NC ABSTRACT Release 2.1 of SAS
Chapter 6: Analyze Microsoft Dynamics NAV 5.0 Data in Microsoft Excel CHAPTER 6: ANALYZE MICROSOFT DYNAMICS NAV 5.0 DATA IN MICROSOFT EXCEL Objectives The objectives are: Explain the process of exporting
The Company Rocks Introduction to Pivot Tables in Excel 2003 Step-by-step instructions to accompany video lessons Danny Rocks 4/11/2011 Introduction to Pivot Tables in Excel 2003 Pivot Tables are the most
Using Excel Files 18.00 2.73 The Excel Environment 3.20 0.14 Opening Microsoft Excel 2.00 0.12 Opening a new workbook 1.40 0.26 Opening an existing workbook 1.50 0.37 Save a workbook 1.40 0.28 Copy a workbook
Paper PH-02-2015 Project Management of SAS Tasks - Excel Dashboard without Using Any Program Kalaivani Raghunathan, Quartesian Clinical Research Pvt. Ltd, Bangalore, India ABSTRACT Have you ever imagined