Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Data Tables and Pivot Tables

in MS Excel
Decision Models and Uncertainty
Prabhu Aggarwal
Data Tables in MS Excel

Prabhu Aggarwal
Data Tables
• Data tables are a useful method of
displaying a formula on a spreadsheet
for varying input values
• Can be either 1 variable or 2 variable
input tables
Example
• Consider the following data on a mortgage:
– Purchase Price: $250,000
– Interest Rate: 10% Annually
– Term: 240 Months
– Down Payment: 10%
• Calculate monthly payments for above case
• Create a One-Variable Table using interest
rate as variable (6% to 14%) and the output
should be monthly payments
Step 1
• Setup a spreadsheet to
first calculate the
monthly payment for a
given scenario. In the
fig below, cell D13 is
the monthly payment
amount and we use the
PMT function
Step 2
To build a 1 variable table
Do the following:

1. Put desired input values in


a column (see fig:
C17:C25)
2. In next column (column D)
entire desired formula in
header cell (D16).
Therefore you will enter
=D13 in cell D16
3. Select Table (C16:D25)
and choose Data Table
from menu …
Step 3
• After selecting Data
Table enter the cell
reference to your input
(in this case interest
rate) in column input
cell. Interest rate is in
D17.
• Use Column as input
values are in column
format
• Choose OK
Step 4
• The desired result is
as shown
• You can format your
tables by adding
background and
borders
Two Variable Data Table
• Suppose we wish to vary two inputs and
calculate a desired value
• Example
– Interest rate varies from 6% to 12% in
increments of 2%
– Number of months varies from 120 to 360
in increments of 60 months
• We will setup a two-variable data table
Step 1
• For the same spreadsheet
setup a table with interest rates
in a row(C17:F17 ) and number
of months in a column (cells
B18:B21 )
• Enter desired formula (=D13) in
cell B17
• Whatever you put in B17 is what
will populate the two-variable
table
• Select table (B17:F21) and then
Data Table from Menu …
Step 2
• Enter cell reference
(D11) to interest rate
in Row input cell
and cell reference
(D12) to months in
Column input cell
• Select OK
Step 3
• Desired result
follows
• Again format table
as desired
• Note: You can
change any of the
inputs (cells D9 to
D12) and the table
will be updated
Pivot Tables
• Pivot tables are a useful method of
Extracting / displaying information from
a list / database in Excel
Example
• Consider the bankers case
• Database contains:
Date Amount AcctType OpenedBy Branch Customer

• 350 Records in the field


Questions
• 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 is the $ distribution among the various account
types?
• Do tellers have a propensity to open a particular type
of account? How about New Account Reps?
• How is the central branch doing when compared to the
other branches?
• Is there a branch that is bringing in more “new”
business?
What is the total deposit amount for each
branch, broken down by account type?

• Create a pivot table by going to data -


pivot table and entering the wizard
• Choose the entire list as the database
source
• In Layout, select branch into row,
account type into column and Amount
into Data
• You should get the following:
Pivot Table:

Let’s try some others

You might also like