Anda di halaman 1dari 15

SumProduct Pty Ltd

PLEASE
PLEASE READ:
READ:

Conditional Summing with Multiple Criteria

If,
If, upon
upon opening,
opening, this
this file
file appears
appears to
to contain
contain errors
errors
(e.g.
(e.g. #NAME?),
#NAME?), please
please ensure
ensure the
the following:
following:

Go to Table of Contents

Go
Go to
to Tools
Tools ->
-> Add-Ins
Add-Ins (ALT
(ALT +
+T
T+
+ I,
I, all
all versions
versions of
of
Excel);
Excel);
Make
Make sure
sure Analysis
Analysis ToolPak
ToolPak and
and Analysis
Analysis ToolPak
ToolPak
-- VBA
VBA add-ins
add-ins are
are both
both checked.
checked.

Primary Developer: Liam Bastick


General Cover Notes:
Various illustrations of how to sum data satisfying multiple criteria.
Any queries, please e-mail:
Website:

liam.bastick@sumproduct.com
www.sumproduct.com

Table of Contents
Conditional Summing with Multiple Criteria
Go to Cover Sheet

Section & Sheet Titles


1. Assumptions
a.
b.
c.
d.
e.
f.
g.

Simple SUMIF Examples


Concatenated SUMIF Example
Conditional Sum Wizard Example
DSUM Example
Example Sales Report
Simple SUMPRODUCT Example
OR Examples

Total Pages:

Page
3
4
5
6
7
8
9
10

10

Assumptions
Section 1.
Conditional Summing with Multiple Criteria
Go to Table of Contents

Section Cover Notes:


Various illustrations of working with multiple criteria.

330746203.xls
Assumptions_SC
Printed: 11:27:14 on 09/23/2016

Page 3 of 15

SumProduct Pty Ltd

General Assumptions
Conditional Summing with Multiple Criteria
Go to Table of Contents


General Assumptions
Set
Model Period Type

Primary
1

Financial Year End Month

12

Model Start Date


Forecast Periods
First Period End Month
First Period End Date
First Period Financial Title

1/1/06
20
December
31/12/06
Year

Model Denomination

Notes:
1. The "First Period End Date" only applies to Forecast Output and Forecast Assumptions Sheets based on the "Month
End" Forecast Sheet Type.
2. The "Model Denomination" assumption will not necessarily automatically change the denomination of the outputs of this
model.

330746203.xls
GA
Printed: 11:27:14 on 09/23/2016

Page 4 of 15

SumProduct Pty Ltd

Simple SUMIF Examples


Conditional Summing with Multiple Criteria
Go to Table of Contents


Simple SUMIF Examples
Dummy Database
Business Unit
1
1
1
1
2
2
2
3
3
4

Product Type
X
Y
Z
Z
X
X
Z
Y
Z
Y

Sales
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000

Business Unit
NOT Business Unit

1
4

$1,000
$4,500

Product Type

$1,200

SUMIF Illustrations

330746203.xls
Simple_SUMIF_Examples_BA
Printed: 11:27:14 on 09/23/2016

Page 5 of 15

SumProduct Pty Ltd

Concatenated SUMIF Example


Conditional Summing with Multiple Criteria
Go to Table of Contents


Concatenated SUMIF Example
Dummy Database
Business Unit
1
1
1
1
2
2
2
3
3
4

Product Type
X
Y
Z
Z
X
X
Z
Y
Z
Y

'Mega-Criterion'
1X
1Y
1Z
1Z
2X
2X
2Z
3Y
3Z
4Y

Sales
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000

SUMIF Illustrations
Business Unit
Product Type
Solution

330746203.xls
Concatenated_SUMIF_BA
Printed: 11:27:14 on 09/23/2016

1
Z
$700

Page 6 of 15

SumProduct Pty Ltd

Conditional Sum Wizard Example


Conditional Summing with Multiple Criteria
Go to Table of Contents


Conditional Sum Wizard Example
Dummy Database
Business Unit
1
1
1
1
2
2
2
3
3
4

Product Type
X
Y
Z
Z
X
X
Z
Y
Z
Y

Sales
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000

Conditional Sum Wizard Solution


Business Unit
Product Type

1
Z

Solution

$700

From Conditional Sum Wizard

Simpler Array Formula

$700

Contains only one IF statement

330746203.xls
Conditional_Sum_Wizard_Ex_BA
Printed: 11:27:14 on 09/23/2016

Page 7 of 15

SumProduct Pty Ltd

DSUM Example
Conditional Summing with Multiple Criteria
Go to Table of Contents


DSUM Example
Dummy Database
Business Unit
1
1
1
1
2
2
2
3
3
4

Product Type
X
Y
Z
Z
X
X
Z
Y
Z
Y

Sales
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000

DSUM Criteria
Business Unit
1

Product Type
Z

Solution

330746203.xls
DSUM_Example_BA
Printed: 11:27:14 on 09/23/2016

$2,600

Page 8 of 15

SumProduct Pty Ltd

Example Sales Report


Conditional Summing with Multiple Criteria
Go to Table of Contents


Example Sales Report
Dummy Outputs
Unit Price
$1
$2
$5
$10
$50
$100

# Sales
10
18
25
6
9
4

Total Sales
$10
$36
$125
$60
$450
$400
$1,081

SUMPRODUCT

330746203.xls
Example_Sales_Report_BA
Printed: 11:27:14 on 09/23/2016

$1,081

Page 9 of 15

SumProduct Pty Ltd

Simple SUMPRODUCT Example


Conditional Summing with Multiple Criteria
Go to Table of Contents


Simple SUMPRODUCT Example
Dummy Database
Business Unit
1
1
1
1
2
2
2
3
3
4

Product Type
X
Y
Z
Z
X
X
Z
Y
Z
Y

Sales
$100
$200
$300
$400
$500
$600
$700
$800
$900
$1,000

SUMPRODUCT Illustration
Business Unit
Product Type
Solution

330746203.xls
SUMPRODUCT_Example_BA
Printed: 11:27:14 on 09/23/2016

1
Z
$700

Page 10 of 15

SumProduct Pty Ltd

OR Examples
Conditional Summing with Multiple Criteria
Go to Table of Contents

OR Examples
Random Data
Name
### Bart
### Mike
### George

Training Course
Ark Building
Income Tax
Entrepreneur Workshop

Day of Week
Monday
Friday
Tuesday

Co Type
Charity
Govt
Other

### Mike

Finance

Monday

Mining

Average Score Sales Amt


7.9
$1,202
8.5
$5,532
8.1
$1,197
6.6

Random
Random database
database used
used for
for the
the examples
examples below
below

$5,273

Multiple OR Criteria
Criteria
Name

Training Course

Day of Week

Co Type

These
These are
are the
the OR
OR criteria,
criteria, i.e.
i.e. ifif any
any of
of these
these criteria
criteria
are
are satisfied
satisfied the
the Sales
Sales Amount
Amount is
is included
included in
in the
the
total.
total.

Average Score Exceeds

9.0

Array Solution
Sales Amt

The
The array
array function
function adds
adds each
each of
of the
the evalated
evalated criteria.
criteria.
If
If any
any are
are TRUE,
TRUE, the
the sum
sum of
of these
these criteria
criteria is
is also
also
deemed
deemed to
to be
be TRUE.
TRUE.

$297,264

DSUM Solution
Criteria Rewritten
Name
Hilda

Training Course

Day of Week

Co Type

Average Score

Ark Building

This
This is
is the
the Criteria
Criteria Table
Table for
for DSUM.
DSUM. Entries
Entries on
on
different
different rows
rows work
work like
like OR.
OR. More
More than
than one
one entry
entry on
on
the
same
row
is
an
AND
condition.
the same row is an AND condition.

Monday
Charity
>9.0

Solution
Sales Amt

$297,264

SUMPRODUCT Solution
Sales Amt

330746203.xls
OR_Examples_BA
Printed: 11:27:15 on 09/23/2016

$297,264

Crafty
Crafty use
use of
of SUMPRODUCT.
SUMPRODUCT. Trying
Trying to
to put
put OR
OR logic
logic
would
would be
be very
very complicated
complicated for
for more
more than
than two
two
conditions
conditions (due
(due to
to the
the need
need to
to remove
remove double
double
counting).
counting).
Instead
Instead of
of trying
trying to
to write
write an
an horrific
horrific expression
expression with
with
OR,
OR, SUM(Everything)
SUM(Everything) -- SUMPRODUCT(None
SUMPRODUCT(None of
of
the
the criteria
criteria hold)
hold) must
must equal
equal SUMPRODUCT(At
SUMPRODUCT(At
least
one
criteria
holds).
least one criteria holds).

Page 11 of 15

SumProduct Pty Ltd

[Insert Output Section Title]


Section 2.
Conditional Summing with Multiple Criteria
Go to Table of Contents

Section Cover Notes:


[Insert section cover note 1]
[Insert section cover note 2]
[Insert section cover note 3]

330746203.xls
Output_SC
Printed: 11:27:15 on 09/23/2016

Page 12 of 15

SumProduct Pty Ltd

Model Lookup Tables


Section 3.
Conditional Summing with Multiple Criteria
Go to Table of Contents

Section Cover Notes:


[Insert section cover note 1]
[Insert section cover note 2]
[Insert section cover note 3]

330746203.xls
Lookup_SC
Printed: 11:27:15 on 09/23/2016

Page 13 of 15

SumProduct Pty Ltd

General Lookup Tables


Conditional Summing with Multiple Criteria
Go to Table of Contents


Months Lookup
Month
January
February
March
April
May
June
July
August
September
October
November
December

Model Quarter Lookup

Names:
LU_Mths
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec

Model Period Type Lookup


Model Period Type
Annual
Semi-Annual
Quarterly
Monthly

Period Names Lookup


Period Name
Year
Half Year
Quarter
Month

Model Half Year Lookup

LU_Qtrs
Qtr_1
Qtr_2
Qtr_3
Qtr_4

Periods in Year
1
2
4
12

330746203.xls
GL
Printed: 11:27:15 on 09/23/2016

Names:
LU_Per_Names
Yr_Name
Half_Yr_Name
Qtr_Name
Mth_Name

Names:
LU_Pers_In_Yr
Yrs_In_Yr
Halves_In_Yr
Qtrs_In_Yr
Mths_In_Yr

Names:
Yes / No Input Lookup

Half Year
H1
H2

LU_Pers
Ann
Semi_Ann
Qtrly
Mthly

Names:
Periods in Year Lookup

Quarter
Q1
Q2
Q3
Q4

Names:

LU_Halves
Half_1
Half_2

Yes / No Input
Yes
No

Names:

Model Denomination Lookup


Denomination
$Billions
$Millions
$'000
$

Time Constants Lookup


Time Constant
60
60
24
7
52
3
6

Conversion Factor Lookup


Conversion Factor
10
100
1,000
1,000,000
1,000,000,000

Names:
LU_Denom
Billions
Millions
Thousands
Currency

Names:
Secs_In_Min
Mins_In_Hr
Hrs_In_Day
Days_In_Wk
Wks_In_Yr
Mths_In_Qtr
Mths_In_Half_Yr

Names:
Ten
Hundred
Thousand
Million
Billion

LU_Yes_No
Yes
No

Page 14 of 15

SumProduct Pty Ltd

Various Lookup Data


Conditional Summing with Multiple Criteria
Go to Table of Contents

Various Lookup Data


Various Lookup Data Table
Ann
Bart
Craig
Delia
Eric
Fiona
George
Hilda
Ivan
Julie
Karl
Louise
Mike
Nancy
Oliver

Training Course Data


Training Course Data Table
Ark Building
Bungee Jumping
Crocquet
Daffodil Arranging
Entrepreneur Workshop
Finance
Gaming
History
Income Tax
Joke Telling
Key Cutting

330746203.xls
Various_Lookups_BL
Printed: 11:27:15 on 09/23/2016

Names:
LU_Names

Names:
LU_Courses

Page 15 of 15

SumProduct Pty Ltd