Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ex 1: Add w 1 condition.
Ex 2: Add w 2 criteria.
Ex3: Add w 3 criteria.
Ex 4: Greater than
Ex 5: Greater than or
equal to
Ex 6: Less than
Ex 7: Less than or
equal to
Ex 8: Equal
Ex 9: Not
Ex 10: SUMIF if criteria & sum range are same: Saves Typing.
Ex 11: Add w Comparative Operator - Criteria in Cell.
Ex 12: Add w Comparative Operator - Criteria NOT in Cell.
Ex 13: Add w 3 criteria, including "ALL": ?*
Ex 14: Contains Criteria (Partial Text Match or Fuzzy Match).
Ex 15: Any Customer with exactly 2 characters.
Ex 16: Criteria typed DIRECTLY into formula (often times this is inefficient).
Ex 17: SUMIFS copied down a column.
Ex 18: SUMIFS copied down a column and across rows (copied to whole table).
Ex 19: Sum Between Two Numbers (Lower Included, Upper Not).
Ex 20: Sum Between Two Dates Inclusive.
Ex 21: Sum Cells with Corresponding Empty Cells.
Ex 22: Sum w/ Corr. Empty Cells or Null Text String.
Ex 23: Sum w/ Corr. NOT Empty Cells. (Add when there is text, numbers, Null Text String).
Ex 24: Sum w/ Corr. NOT Empty Cells or NOT Null Text String.
Ex 25: Wildcard as Character: Use "~"& to tell SUMIFS to look for *
Ex 26: Criteria for SUMIFS is not case sensitive.
Ex 27: Case Sensitive: Use EXACT inside SUMPRODUCT.
Ex 28: SUMIFS that looks to a different sheet.
Ex 29: SUMIFS Can't Handle 3_D Cell References.
Ex 30: SUMIFS to add from multiple columns across multiple sheets using INDIRECT and SUMPRODUC
Ex 31: SUMIFS to add from multiple columns across multiple sheets using Sheet Reference and SUMIF
Ex 32: SUMIFS will not read external references when the workbook is closed.
Ex 33: Solutions for SUMIFS with external references.
Ex 34: SUMIFS with Year Criteria Mismatched against Serial Numbers.
Ex 35: SUMIFS with Month As Text Criteria Mismatched against Serial Numbers.
Ex 36: SUMIF with only 1 cell in sum_range is volatile.
* SUMIFS = add with 1 or more criteria / condition. SUMIF = add with 1 criterion.
* What we learn in this video is applicable to COUNTIFS, COUNTIF, AVERAGEIFS, and so on.
* SUMIFS uses AND criteria - all criteria must be met for number to be added.
* SUMIFS Faster calculating than DSUM and SUMPRODUCT equivalents.
* SUMIFS Formula can be copied down a column, unlike DSUM.
* SUMIFS Formulas update instantly when data changes, PivotTables don't.
Ex 1: Add w 1 condition.
Customer Add Sales
Amazon
* SUMIFS nice for 1 criteria because screen tips are less ambiguous than SUMIF.
* Data Validation, List can prevent criteria that is not in list.
* "?*" at the top of each list allows you to have criterion for
ALL items in column that have at least 1 character.
Ex 2: Add w 2 criteria.
Customer Sales Rep
Amazon Gigi <= BOTH must be TRUE, for SUMIFS to add.
Add Sales
Ex 10: SUMIF if criteria & sum range are same: Saves Typing.
Comparative Operators Sales Add Sales If the criteria
Greater >5000 range and sum
Greater than or
equal >=5000 range are the
Less <5000 same range and
Less than or
equal <=5000 contain numbers,
Equal 5000 use SUMIF
Not <>5000 because then you
have to type in just
one range.
North or NorthEast.
Ex 16: Criteria typed DIRECTLY into formula (often times this is inefficient).
Total Sales For "North"
* Hard Coding formula elements that can change into your formula violates the
original intent of spreadhsheets.
* The original intent of Bricklin and Frankston was that formula inputs be typed into
cells and then refereed to with cell references.
* Excel's Golden Rule:
* If formula inputs can change, type them into a cell and refer to them
in formulas with cell references.
* If formula inputs will not change (like 24 hours in day, 12 months in year),
then it can be efficient to type them directly into formula.
Ex 18: SUMIFS copied down a column and across rows (copied to whole table).
Add Sales
Customer
Google
SalesRep/Region MidWest North NorthEast SouthEast West
Batt
Bill
Chin
Fran
Gigi
Pham
Shelia
Sioux
Sue
Tina
* Be sure to not 'Double Count'. If you include two = signs you may 'Double Count'.
Ex 20: Sum Between Two Dates Inclusive.
Lower Upper Total
1/1/12 1/31/12
2/1/12 2/29/12
3/1/12 3/31/12
4/1/12 4/30/12
Ex 23: Sum w/ Corr. NOT Empty Cells. (Add when there is text, numbers, Null Text String).
Ex 24: Sum w/ Corr. NOT Empty Cells or NOT Null Text String.
NOT Empty or NOT Null
Text String Total SUM - ""
Calculation:
1) =SUMPRODUCT(--EXACT(I185:I191,I182),--(J185:J191=J182),K185:K191)
* EXACT compares the value in I182 to the column of names and delivers
a TRUE when there is a case sensitive match.
2) =SUMPRODUCT(--{TRUE;TRUE;FALSE;FALSE;TRUE;TRUE;FALSE},--(J185:J191=J182),K185
* SUMPRODUCT can not read TRUEs and FALSEs.
* SUMPRODUCT can read 1s and 0s.
* The most efficient way to convert TRUEs and FALSEs to 1s and 0s is with Double Negat
3) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
4) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
* Delivers a TRUE when it finds "West".
5) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},K185:K191)
6) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
7) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
* SUMPRODUCT multiplies arrays and then adds.
* Only when it sees 1*1*20 will it get a non-zero number.
8) =SUMPRODUCT({20;0;0;0;0;50;0})
9) The formula evaluates to 70.
Ex 30: SUMIFS to add from multiple columns across multiple sheets using INDIRECT and SUMPRODUC
List Sheets: Region
Week(1) West
Week(2) Total
Week(3)
Calculation:
1) =SUMPRODUCT(SUMIFS(INDIRECT("'"&I229:I231&"'!C2:C7"),INDIRECT("'"&I229:I231&"'!B
* INDIRECT takes text that represnets references & converts them to references.
2) =SUMPRODUCT(SUMIFS('Week(1):Week(3)'!C2:C7,'Week(1):Week(3)'!A2:A7,J229))
* INDIRECT is our way of "tricking" SUMIFS function into doing 3-D cell Reference.
* The SUMIFS will now to three conditional summations, one for each sheet.
3) =SUMPRODUCT({60;110;120})
* SUMIFS returns an array of values, so to add them,
we use SUMPRODUCT (specifically programmed to handle array calculations.
Ex 31: SUMIFS to add from multiple columns across multiple sheets using Sheet Reference and SUMIF
Region
West
Total * "Reference Globally, Calculate Locally"
* This method will reduce the volatile calculatuions cause
Ex 32: SUMIFS will not read external references when the workbook is closed.
Names Region Total
Joe West
* =SUMIFS(K278:K282,J278:J282,J266,I278:I282,">=1/1/"&I266,I278:I282,"<=12/31/"&I266)
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
Total
* =SUMPRODUCT(--(YEAR(I278:I282)=I266),--(J278:J282=J266),K278:K282)
* Slower calculating than SUMIFS.
Ex 35: SUMIFS with Month As Text Criteria Mismatched against Serial Numbers.
Month Year Total
Dec 2012
* =SUMIFS(J290:J294,I290:I294,">=1"&I287&J287,I290:I294,"<="&EOMONTH(1&I287&J287,0))
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
* =SUMPRODUCT(--(TEXT(I290:I294,"mmmyyy")=I287&J287),J290:J294)
* Slower calculating than SUMIFS.
* If sum_range is given just the upper most left corner of the range, it will assume the dimension of th
* This may cause worksheet recalculation may take longer than expected.
0
Null Text string from formula: =""
Empty = nothing, not even Null Text String.
:J191=J182),K185:K191)
"'"&I229:I231&"'!B2:B7"),J229))
2:A7,J229))
287&J287,0))
with many formulas).
the dimension of the range argument.
Region SalesRep Customer
?* ?* ?*
MidWest Batt Amazon
North Bill Costco
NorthEast Chin Economist
SouthEast Fran Fred Myer
West Gigi Google
Pham HD
Shelia HM
Sioux McLendon's
Sue OD
Tina Peet's
QFC
WFM
Yahoo
* SUMIFS = add with 1 or more criteria / condition. SUMIF = add with 1 criterion.
* What we learn in this video is applicable to COUNTIFS, COUNTIF, AVERAGEIFS, and so on.
* SUMIFS uses AND criteria - all criteria must be met for number to be added.
* SUMIFS Faster calculating than DSUM and SUMPRODUCT equivalents.
* SUMIFS Formula can be copied down a column, unlike DSUM.
* SUMIFS Formulas update instantly when data changes, PivotTables don't.
Ex 1: Add w 1 condition.
Customer Add Sales
Amazon 1,380,328
* SUMIFS nice for 1 criteria because screen tips are less ambiguous than SUMIF.
* Data Validation, List can prevent criteria that is not in list.
* "?*" at the top of each list allows you to have criterion for
ALL items in column that have at least 1 character.
Ex 2: Add w 2 criteria.
Customer Sales Rep
Amazon Gigi <= BOTH must be TRUE, for SUMIFS to add.
Add Sales
130,238
Ex 10: SUMIF if criteria & sum range are same: Saves Typing.
Comparative Operators Sales Add Sales If the criteria
Greater >5000 7,472,607 range and sum
Greater than or
equal >=5000 7,487,607 range are the
Less <5000 2,595,939 same range and
Less than or
equal <=5000 2,610,939 contain numbers,
Equal 5000 15,000 use SUMIF
Not <>5000 10,068,546 because then you
have to type in just
one range.
North or NorthEast.
Ex 16: Criteria typed DIRECTLY into formula (often times this is inefficient).
Total Sales For "North" 1,706,413
* Hard Coding formula elements that can change into your formula violates the
original intent of spreadhsheets.
* The original intent of Bricklin and Frankston was that formula inputs be typed into
cells and then refereed to with cell references.
* Excel's Golden Rule:
* If formula inputs can change, type them into a cell and refer to them
in formulas with cell references.
* If formula inputs will not change (like 24 hours in day, 12 months in year),
then it can be efficient to type them directly into formula.
Ex 18: SUMIFS copied down a column and across rows (copied to whole table).
Add Sales
Customer
Google
SalesRep/Region MidWest North NorthEast SouthEast West
Batt 11,282 12,840 27,623 8,422 8,937
Bill 0 13,981 21,727 0 4,294
Chin 24,428 9,929 40,007 0 17,880
Fran 26,155 7,206 41,310 24,291 11,751
Gigi 7,409 9,411 16,724 22,800 23,152
Pham 4,519 17,978 20,112 13,916 5,166
Shelia 41,513 16,672 55,424 18,054 10,527
Sioux 30,020 17,602 8,116 20,684 14,644
Sue 1,978 4,482 23,312 12,023 4,276
Tina 15,662 369 11,361 10,189 21,266
* Be sure to not 'Double Count'. If you include two = signs you may 'Double Count'.
Ex 20: Sum Between Two Dates Inclusive.
Lower Upper Total
1/1/12 1/31/12 445,785
2/1/12 2/29/12 431,803
3/1/12 3/31/12 376,553
4/1/12 4/30/12 395,296
Ex 23: Sum w/ Corr. NOT Empty Cells. (Add when there is text, numbers, Null Text String).
Ex 24: Sum w/ Corr. NOT Empty Cells or NOT Null Text String.
NOT Empty or NOT Null
Text String Total SUM - ""
9
Calculation:
1) =SUMPRODUCT(--EXACT(I185:I191,I182),--(J185:J191=J182),K185:K191)
* EXACT compares the value in I182 to the column of names and delivers
a TRUE when there is a case sensitive match.
2) =SUMPRODUCT(--{TRUE;TRUE;FALSE;FALSE;TRUE;TRUE;FALSE},--(J185:J191=J182),K185
* SUMPRODUCT can not read TRUEs and FALSEs.
* SUMPRODUCT can read 1s and 0s.
* The most efficient way to convert TRUEs and FALSEs to 1s and 0s is with Double Negat
3) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
4) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
* Delivers a TRUE when it finds "West".
5) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},K185:K191)
6) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
7) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
* SUMPRODUCT multiplies arrays and then adds.
* Only when it sees 1*1*20 will it get a non-zero number.
8) =SUMPRODUCT({20;0;0;0;0;50;0})
9) The formula evaluates to 70.
Ex 30: SUMIFS to add from multiple columns across multiple sheets using INDIRECT and SUMPRODUC
List Sheets: Region
Week(1) West
Week(2) Total
Week(3) 0
Calculation:
1) =SUMPRODUCT(SUMIFS(INDIRECT("'"&I229:I231&"'!C2:C7"),INDIRECT("'"&I229:I231&"'!B
* INDIRECT takes text that represnets references & converts them to references.
2) =SUMPRODUCT(SUMIFS('Week(1):Week(3)'!C2:C7,'Week(1):Week(3)'!A2:A7,J229))
* INDIRECT is our way of "tricking" SUMIFS function into doing 3-D cell Reference.
* The SUMIFS will now to three conditional summations, one for each sheet.
3) =SUMPRODUCT({60;110;120})
* SUMIFS returns an array of values, so to add them,
we use SUMPRODUCT (specifically programmed to handle array calculations.
Ex 31: SUMIFS to add from multiple columns across multiple sheets using Sheet Reference and SUMIF
Region
West
Total * "Reference Globally, Calculate Locally"
230 * This method will reduce the volatile calculatuions cause
Ex 32: SUMIFS will not read external references when the workbook is closed.
Names Region Total
Joe West Err:504
* =SUMIFS(K278:K282,J278:J282,J266,I278:I282,">=1/1/"&I266,I278:I282,"<=12/31/"&I266)
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
Total 80
* =SUMPRODUCT(--(YEAR(I278:I282)=I266),--(J278:J282=J266),K278:K282)
* Slower calculating than SUMIFS.
Ex 35: SUMIFS with Month As Text Criteria Mismatched against Serial Numbers.
Month Year Total
Dec 2012 13
* =SUMIFS(J290:J294,I290:I294,">=1"&I287&J287,I290:I294,"<="&EOMONTH(1&I287&J287,0))
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
* =SUMPRODUCT(--(TEXT(I290:I294,"mmmyyy")=I287&J287),J290:J294)
* Slower calculating than SUMIFS.
* If sum_range is given just the upper most left corner of the range, it will assume the dimension of th
* This may cause worksheet recalculation may take longer than expected.
0
Null Text string from formula: =""
Empty = nothing, not even Null Text String.
:J191=J182),K185:K191)
"'"&I229:I231&"'!B2:B7"),J229))
2:A7,J229))
287&J287,0))
with many formulas).
the dimension of the range argument.
Region SalesRep Customer
?* ?* ?*
MidWest Batt Amazon
North Bill Costco
NorthEast Chin Economist
SouthEast Fran Fred Myer
West Gigi Google
Pham HD
Shelia HM
Sioux McLendon's
Sue OD
Tina Peet's
QFC
WFM
Yahoo
Names Region Number Sum With Citeria
Joe West 20
Tom East 30
Tina West 10
Tina West 10
Joe East 30
Joe West 20
120
Names Region Number Sum With Citeria
Joe West 50 110
Tom East 20
Tina East 10
Tina West 50
Tina East 50
Tina West 10
190
Names Region Number Sum With Citeria
Tom East 10 120
Tom West 30
Tina West 20
Tina West 40
Joe West 30
Joe East 30
160
* SUMIFS = add with 1 or more criteria / condition. SUMIF = add with 1 criterion.
* Everything we learn in this video is applicable to COUNTIFS, COUNTIF, AVERAGEIFS, and so on.
* SUMIFS uses AND criteria - all criteria must be met for number to be added.
* SUMIFS Faster calculating than DSUM and SUMPRODUCT equivalents.
* SUMIFS Formula can be copied down a column, unlike DSUM.
* SUMIFS Formulas update instantly when data changes, PivotTables don't.
Ex 1: Add w 1 condition.
Customer Add Sales
Amazon 1,380,328
* SUMIFS nice for 1 criteria because screen tips are less ambiguous than SUMIF.
* Data Validation, List can prevent criteria that is not in list.
* "?*" at the top of each list allows you to have criterion for
ALL items in column that have at least 1 character.
Ex 2: Add w 2 criteria.
Customer SalesRep
Amazon Gigi
Add Sales
130,238
Ex 10: SUMIF if criteria & sum range are same: Saves Typing.
Comparative Operators Sales Add Sales If the criteria
Greater >5000 7,472,607 range and sum
Greater than or
equal >=5000 7,487,607 range are the
Less <5000 2,595,939 same range and
Less than or
equal <=5000 2,610,939 contain numbers,
Equal 5000 15,000 use SUMIF
Not <>5000 10,068,546 because then you
have to type in just
one range.
North or NorthEast.
Ex 16: Criteria typed DIRECTLY into formula (often times this is inefficient).
Total Sales For "North" 1,706,413
* Hard Coding formula elements that can change into your formula violates the
original intent of spreadhsheets.
* The original intent of Bricklin and Frankston was that formula inputs be typed into
cells and then refereed to with cell references.
* Excel's Golden Rule:
* If formula inputs can change, type them into a cell and refer to them
in formulas with cell references.
* If formula inputs will not change (like 24 hours in day, 12 months in year),
then it can be efficient to type them directly into formula.
Ex 18: SUMIFS copied down a column and across rows (copied to whole table).
Add Sales
Customer
Google
SalesRep/Region MidWest North NorthEast SouthEast West
Batt 11,282 12,840 27,623 8,422 8,937
Bill 0 13,981 21,727 0 4,294
Chin 24,428 9,929 40,007 0 17,880
Fran 26,155 7,206 41,310 24,291 11,751
Gigi 7,409 9,411 16,724 22,800 23,152
Pham 4,519 17,978 20,112 13,916 5,166
Shelia 41,513 16,672 55,424 18,054 10,527
Sioux 30,020 17,602 8,116 20,684 14,644
Sue 1,978 4,482 23,312 12,023 4,276
Tina 15,662 369 11,361 10,189 21,266
* Be sure to not 'Double Count'. If you include two = signs you may 'Double Count'.
Ex 23: Sum w/ Corr. NOT Empty Cells. (Add when there is text, numbers, Null Text String).
Ex 24: Sum w/ Corr. NOT Empty Cells or NOT Null Text String.
NOT Empty or NOT Null
Text String Total
9
Calculation:
1) =SUMPRODUCT(--EXACT(I185:I191,I182),--(J185:J191=J182),K185:K191)
* EXACT compares the value in I182 to the column of names and delivers
a TRUE when there is a case sensitive match.
2) =SUMPRODUCT(--{TRUE;TRUE;FALSE;FALSE;TRUE;TRUE;FALSE},--(J185:J191=J182),K185
* SUMPRODUCT can not read TRUEs and FALSEs.
* SUMPRODUCT can read 1s and 0s.
* The most efficient way to convert TRUEs and FALSEs to 1s and 0s is with Double Negat
3) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
4) =SUMPRODUCT({1;1;0;0;1;1;0},--(J185:J191=J182),K185:K191)
* Delivers a TRUE when it finds "West".
5) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},K185:K191)
6) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
7) =SUMPRODUCT({1;1;0;0;1;1;0},{1;0;1;0;0;1;1},{20;30;40;20;60;50;30})
* SUMPRODUCT multiplies arrays and then adds.
* Only when it sees 1*1*20 will it get a non-zero number.
8) =SUMPRODUCT({20;0;0;0;0;50;0})
9) The formula evaluates to 70.
Ex 30: SUMIFS to add from multiple columns across multiple sheets using INDIRECT and SUMPRODUC
List Sheets: Region
Week(1) West
Week(2) Total
Week(3) 0
Calculation:
1) =SUMPRODUCT(SUMIFS(INDIRECT("'"&I229:I231&"'!C2:C7"),INDIRECT("'"&I229:I231&"'!B
* INDIRECT takes text that represnets references & converts them to references.
2) =SUMPRODUCT(SUMIFS('Week(1):Week(3)'!C2:C7,'Week(1):Week(3)'!A2:A7,J229))
* INDIRECT is our way of "tricking" SUMIFS function into doing 3-D cell Reference.
* The SUMIFS will now to three conditional summations, one for each sheet.
3) =SUMPRODUCT({60;110;120})
* SUMIFS returns an array of values, so to add them,
we use SUMPRODUCT (specifically programmed to handle array calculations.
Ex 31: SUMIFS to add from multiple columns across multiple sheets using Sheet Reference and SUMIF
Region
West
Total * "Reference Globally, Calculate Locally"
230 * This method will reduce the volatile calculatuions cause
Ex 32: SUMIFS will not read external references when the workbook is closed.
Names Region Total
Joe West Err:504
* =SUMIFS(K275:K279=SUMIFS(K278:K282,I278:I282,">=1/1/"&I266,I278:I282,"<=12/31/"&I266,J278
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
Total 80
* =SUMPRODUCT(--(YEAR(I278:I282)=I266),--(J278:J282=J266),K278:K282)
* Slower calculating than SUMIFS.
Ex 35: SUMIFS with Month As Text Criteria Mismatched against Serial Numbers.
Month Year Total
Dec 2012 13
* =SUMIFS(J290:J294,I290:I294,">=1"&I287&J287,I290:I294,"<="&EOMONTH(1&I287&J287,0))
* Maybe longer to type out, but faster calculating (important in large spreadsheets with many formula
* =SUMPRODUCT(--(TEXT(I290:I294,"mmmyyy")=I287&J287),J290:J294)
* Slower calculating than SUMIFS.
* If sum_range is given just the upper most left corner of the range, it will assume the dimension of th
* This may cause worksheet recalculation may take longer than expected.
Null Text string from formula: =""
Empty = nothing, not even Null Text String.
:J191=J182),K185:K191)
"'"&I229:I231&"'!B2:B7"),J229))
2:A7,J229))
287&J287,0))
with many formulas).
the dimension of the range argument.
Region SalesRep Customer
?* ?* ?*
MidWest Batt Amazon
North Bill Costco
NorthEast Chin Economist
SouthEast Fran Fred Myer
West Gigi Google
Pham HD
Shelia HM
Sioux McLendon's
Sue OD
Tina Peet's
QFC
WFM
Yahoo