Download - Creating PivotTables and Macros
Return to the Excel 2007 web page
Lesson 12: Creating PivotTables and Macros
2
Working with PivotTables: Example 1
Raw data in worksheet
Summarized by products sold by each city in a PivotTable
Product totals
City totals
3
Working with PivotTables: Example 2
Summarized by city then by product
City totals
4
How PivotTables Work
5
Manipulating Fields on a PivotTable
Pivoting is the process of dragging a field from a row to a column, or vice versa.
Three fields are selected
Region field dragged to Column Labels area
6
Changing Field Data on a PivotTable
Add or remove fields
Filter for specific items within rows
Suppress display of an item within columns
7
Filtering a PivotTable Report
Choose (All) from the drop-down list to display all items in the field.
8
Editing PivotTable Calculations Change the function Create a calculated field
(custom formula)
Update the active PivotTable or all PivotTables in workbook
PivotTables do not automatically update after the source data is changed.
9
Working with PivotCharts Create from a PivotTable or worksheet
data Add or move fields in PivotTable Field List
task pane as usual Filter fields as usual
Format a PivotChart just as you would a regular chart.
10
Setting the Macro Security Level Choose OfficeExcel Options
Disabling with notification displays message when workbook is opened
11
Macros Set of instructions that can be played
back at any time Useful for automating routine tasks
12
Recording a Macro Works like a video recorder
Turn on recorder Name the macro Perform sequence of keystrokes and mouse clicks Stop recording
Where macro is stored
All keystrokes and mouse clicks are recorded, including mistakes and corrections. A macro may be re-recorded, if necessary.
13
Using a Personal Macro Workbook Make macros available in all workbooks
on your computer system
Macros can be used with any workbook
The Personal Macro Workbook is a hidden workbook.
14
Assigning Macros Macros may be run using:
Run command in the Macro dialog box Shortcut keys Custom buttons
15
Using Shortcut Keys Run a macro with a few keystrokes
Assigning a shortcut key to run a macro from within a worksheet
A shortcut key must use either (Ctrl) or (Ctrl)+(Shift) plus a letter.
16
Using Custom Buttons in Worksheets
Insert a shape Assign a macro
Click the button to run the macro
17
Saving a Workbook as Macro Enabled
Use Save As Change the Save As Type Filename is saved with the extension
.xlsm
Return to the Excel 2007 web page
Lesson 12: Creating PivotTables and Macros