18
Return to the Excel 2007 web page Lesson 12: Creating PivotTables and Macros

Creating PivotTables and Macros

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Creating PivotTables and Macros

Return to the Excel 2007 web page

Lesson 12: Creating PivotTables and Macros

Page 2: 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

Page 3: Creating PivotTables and Macros

3

Working with PivotTables: Example 2

Summarized by city then by product

City totals

Page 4: Creating PivotTables and Macros

4

How PivotTables Work

Page 5: Creating PivotTables and Macros

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

Page 6: Creating PivotTables and Macros

6

Changing Field Data on a PivotTable

Add or remove fields

Filter for specific items within rows

Suppress display of an item within columns

Page 7: Creating PivotTables and Macros

7

Filtering a PivotTable Report

Choose (All) from the drop-down list to display all items in the field.

Page 8: Creating PivotTables and Macros

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.

Page 9: Creating PivotTables and Macros

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.

Page 10: Creating PivotTables and Macros

10

Setting the Macro Security Level Choose OfficeExcel Options

Disabling with notification displays message when workbook is opened

Page 11: Creating PivotTables and Macros

11

Macros Set of instructions that can be played

back at any time Useful for automating routine tasks

Page 12: Creating PivotTables and Macros

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.

Page 13: Creating PivotTables and Macros

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.

Page 14: Creating PivotTables and Macros

14

Assigning Macros Macros may be run using:

Run command in the Macro dialog box Shortcut keys Custom buttons

Page 15: Creating PivotTables and Macros

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.

Page 16: Creating PivotTables and Macros

16

Using Custom Buttons in Worksheets

Insert a shape Assign a macro

Click the button to run the macro

Page 17: Creating PivotTables and Macros

17

Saving a Workbook as Macro Enabled

Use Save As Change the Save As Type Filename is saved with the extension

.xlsm

Page 18: Creating PivotTables and Macros

Return to the Excel 2007 web page

Lesson 12: Creating PivotTables and Macros