Professional Documents
Culture Documents
Introduction
Excel allows you to create cross-tab (or cross-tabulation) analysis in what it calls a Pivot
Table.
Pivot tables can be one, two or three-dimensional. You can use multiple statistical analysis
and summary options tools. You can include data from multiple worksheets and you can
modify them dynamically.
6. Notice that the default area contains your entire data range. Accept the default area.
7. Place the Pivot Table on the Existing Worksheet in cell G4 and click [OK].
8. The Pivot Table builder opens.
9. Two PivotTable tabs (Analyze and Design) appear on the Ribbon (shown below).
10. The next step is to specify which data series you are using in your cross-tabulation by
moving the fields from the PivotTable Fields area to the areas below that for Filters,
Columns, Rows and Values.
A One-Dimensional Table
We have learned how to insert subtotals in Excel. You can also get subtotals by using one-
dimensional pivot tables.
11. Drag the [Employee] field list item into the Rows area and ‘drop‘ it.
12. Drag the [Amount] field list item into the Values area and ‘drop’ it.
Now let’s resort the names in a different order and show the values as money.
13. Use the pull down on the Row Labels in the Pivot Table area and choose [Sort Z to A].
14. Highlight cells H5 through H12.
15. Click the dollar sign in the Number area of the Home tab.
A Two-Dimensional Table
By using a second dimension (i.e. a column field as well as a row field), you can get a more
detailed breakdown of the figures. Let’s find the expenditures for employees by category.
16. Add the [Category] field list button to the Columns area.
A Three-Dimensional Table
You can add a third dimension to a pivot table by having a drop-down list from which you select
the third variable. For our existing pivot table, this is not currently a viable option because all
other areas in our sheet refer to dates, and most every date is a different value.
Instead, you’ll create a new field for the Month. You can get this by separating just the month
information from the rest of the date.
27. In the pivot table fields area, when you mouse over the Category column field, you’ll
see an arrow appear on the right side of the highlighted area.
28. Click on the arrow to open an expanded detail box.
29. In the bottom of this section, you’ll see an area where you can further filter the data.
Click on the Stationery check box to unselect it and then click [OK].
Adding New Data
To summarize other data values, you simply drop them into the Data area of the pivot table.
30. Drag the Employee field area into the Values area and ‘drop’ it.
31. The count is shown as currency, both in the Count columns for Travel and Food as well
as the Total column.
32. Highlight (each column separately), right click and go to Format Cells. Choose the
‘General’ option to remove the Currency format from those columns.
33. In the Values area, drag the Count of Employee box above the Sum of Amount.
34. In the Columns area, drag the Values box above the Category box.
37. Change the setting to Average – the Custom name will change but will still say ‘2’.
38. Take out the 2 so the Custom Name is Average of Amount.
Note** notice that we added the same data to the pivot table twice – this can be a very
valuable feature in Excel for analyzing the same data in multiple ways.
Changing the Data Format
39. In the Values area of the Pivot Table Fields window, click the arrow to the right of the
Count of Employee field. Go to Value Field Settings and click to open the Value Field
Settings window.
40. Click on the [Number Format] button.
The Format Cells window appears.
41. Change the Category: to Number and set Decimal places: to 0.
42. Click [OK] to confirm this.
43. Click [OK] to close the Value Field Settings dialog box.
44. Click in cell G4 when you see the black right facing arrow to highlight the whole pivot
table, then [Ctrl-C] to copy it.
45. Click in cell G18 and [Ctrl-V] to paste the pivot table.
46. In the new pivot table, use the pulldown next to Month (that says (Multiple Items) and
unselect February and March so that all items are included.
47. In the new pivot table, drag the Month field from the Filters box to the Rows area.
48. In the Rows area, drag Month above Employee.
Note that to show or hide particular data for a month, you can click the [-] (which then turns to
a [+]) or click the [+] to reshow the detail.
49. Copy columns A-D (NOT the month column we created earlier) and paste into cell A1 of
‘Sheet1’.
50. Click on cell C3 (or any single cell within the data you pasted).
51. Insert a pivot table using this data into the same worksheet in cell G2.
52. Drag Date to Rows, Amount to Values and Category to Columns.
53. Next, right click on any date value in the pivot table and choose Group. The Grouping
dialog box appears:
Note** For Weekly figures, choose Days then set the Number of days: to 7.
60. Going back to the pivot table in cell G2 (still on Sheet1), Double click on Mar in G6 -
the Show Detail dialog box appears.
61. From the available fields choose Amount then click [OK].
Note** You can show the source row data that was used in the cell calculation by double
clicking on the cell. Excel will then copy the source row information into a new, separate
worksheet.
62. Double click on the $8.65 in cell H18. Rename the resulting sheet tab to Sarah.
Built-in Styles
Excel has a variety of pre-defined layouts for pivot tables built into the program.
63. Click on the Pivot Table Tools Design tab on the Ribbon.
64. Make the top pivot table on the Accounts worksheet Pivot Style Light 14 (the first option
showing). Make the top table on the Sheet1 worksheet Pivot Style Medium 6.
65. For the top table on the Sheet1 worksheet, also choose “Banded Rows” from the
PivotTable Style Options area.
66. On Sheet1, change Sarah’s travel in cell D30 from $63 to $3.75.
67. To update the pivot table, right click on a data field (ex. cell G10) and choose Refresh
(you can also choose Refresh from the Data area of the Pivot Table Analyze tab.
Pivot Charts
You can also make charts of pivot data.