You are on page 1of 8

Copyright 2000 John F.

Lacher

http://www.lacher.com

Sample Excel Macros and Applications


Free downloads at: www.lacher.com

Excel Tutorials
In workbook format with examples, practice ideas and short video demonstrations
Each tutorial covers Excel skills needed for specific applications:
Budgeting
Sales Reporting
Data Analysis
Reporting
Financial Statement Presentation
Charting
Pivot Tables

Purchase tutorials: www.lacher.com

Custom Application Development Via the Internet


Excel, Access, Visio, Word, Visual Basic

Add nationally recognized Excel, Access and MS Office Experts to your team -- with strong business
management backgrounds who are also nationally recognized MS Office consultants and authors.

Pay only for the help you need. To have the same level of expertise at your site, you would need to pay large fees for
recruiting -- or a consultant's travel expenses and daily rate. With On Line Consulting via the Internet, you can receiv
attention in small chunks of time, as needed.

Receiving efficient help via the Internet means fewer phone calls and meetings. You can work with the MS Office Exp
schedule, corresponding via E-Mail at any time and from any location.

More information: consulting@lacher.com


strong business
s and authors.

would need to pay large fees for


g via the Internet, you can receive expert

can work with the MS Office Expert on your


Start

Copyright 2000 John F. Lacher


Excel Tip and Example
Title: PivotTable to Calculate Budget Variances

Keywords: PivotTable, % of PivotTable field calculation, hiding columns

Description: A Visual Basic for Applications procedure useful in displaying Budget variances. The
procedure hides columns in a PivotTable based on the values in the PivotTable data fields.

Tip:
When you create a Pivot Table field to show Budget Variance with the "% of" calclulation
option, the PivotTable will show Actual as a percent of Budget and Budget as a percent of
Budget. You can create a Visual Basic for Applications procedure that will hide the Budget
as a percent of Budget columns.

Guide to the Example:


Source data for the PivotTable is in the worksheet "Pivot Table Database". Buttons above
the PivotTable on the "Pivot Table" worksheet hide and unhide the columns in the table that
contain all 100% values. By hiding these columns, you can use the % of calculation option
and eliminate the "Budget as a percent of Budget" columns.

Page 5
Pivot Table

% of Budget Account Type


A B
Date Actual Budget Actual Budget
Jan 83.33% 100.00% 102.04% 100.00%
Feb 75.00% 100.00% 102.56% 100.00%
Mar 66.67% 100.00% 103.09% 100.00%
Apr 58.33% 100.00% 103.63% 100.00%
May 50.00% 100.00% 104.17% 100.00%
Jun 41.67% 100.00% 104.71% 100.00%
Jul 33.33% 100.00% 105.26% 100.00%
Aug 25.00% 100.00% 105.82% 100.00%
Sep 16.67% 100.00% 102.04% 100.00%
Oct 8.33% 100.00% 96.94% 100.00%
Nov 0.00% 100.00% 91.84% 100.00%
Dec 283.33% 100.00% 86.73% 100.00%

Page 6
Pivot Table Database

Date Account Amount Type


Jan A 10 Actual
Jan B 100 Actual
Jan A 12 Budget
Jan B 98 Budget
Feb A 9 Actual
Feb B 100 Actual
Feb A 12 Budget
Feb B 97.5 Budget
Mar A 8 Actual
Mar B 100 Actual
Mar A 12 Budget
Mar B 97 Budget
Apr A 7 Actual
Apr B 100 Actual
Apr A 12 Budget
Apr B 96.5 Budget
May A 6 Actual
May B 100 Actual
May A 12 Budget
May B 96 Budget
Jun A 5 Actual
Jun B 100 Actual
Jun A 12 Budget
Jun B 95.5 Budget
Jul A 4 Actual
Jul B 100 Actual
Jul A 12 Budget
Jul B 95 Budget
Aug A 3 Actual
Aug B 100 Actual
Aug A 12 Budget
Aug B 94.5 Budget
Sep A 2 Actual
Sep B 100 Actual
Sep A 12 Budget
Sep B 98 Budget
Oct A 1 Actual
Oct B 95 Actual
Oct A 12 Budget
Oct B 98 Budget
Nov A 0 Actual
Nov B 90 Actual
Nov A 12 Budget
Nov B 98 Budget

Page 7
Pivot Table Database

Dec A 34 Actual
Dec B 85 Actual
Dec A 12 Budget
Dec B 98 Budget

Page 8

You might also like