Excel SUMIFS Function
Excel SUMIFS Function
Excel SUMIFS Function
This article describes the formula syntax and usage of the SUMIFS function in Microsoft Excel.
Description
Adds the cells in a range that meet multiple criteria. For example, if you want to sum the numbers in the range
A1:A20 only if the corresponding numbers in B1:B20 are greater than zero (0) and the corresponding numbers
in C1:C20 are less than 10, you can use the following formula:
Syntax
Remarks
Each cell in the sum_range argument is summed only if all of the corresponding criteria specified are
true for that cell. For example, suppose that a formula contains two criteria_range arguments. If the
first cell of criteria_range1 meets criteria1, and the first cell of criteria_range2 meets critera2, the
first cell of sum_range is added to the sum, and so on, for the remaining cells in the specified ranges.
Cells in the sum_range argument that contain TRUE evaluate to 1; cells in sum_range that contain
FALSE evaluate to 0 (zero).
Unlike the range and criteria arguments in the SUMIF function, in the SUMIFS function, each
criteria_range argument must contain the same number of rows and columns as the sum_range
argument.
You can use the wildcard characters the question mark (?) and asterisk (*) in criteria. A question
mark matches any single character; an asterisk matches any sequence of characters. If you want to
find an actual question mark or asterisk, type a tilde (~) before the character.
Examples
EXAMPLE 1
2.
3.
4.
Press CTRL+C.
In Excel, create a blank workbook or worksheet.
In the worksheet, select cell A1, and press CTRL+V.
IMPORTANT For the example to work properly, you must paste it into cell A1 of the worksheet.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas
button.
5.
Quantity Sold
Product
Salesperson
Apples
Apples
15
Artichokes
Artichokes
22
Bananas
12
Bananas
10
Carrots
33
Carrots
10
Formula
Description
Result
20
30
11
12
2.
3.
4.
Press CTRL+C.
In Excel, create a blank workbook or worksheet.
In the worksheet, select cell A1, and press CTRL+V.
IMPORTANT For the example to work properly, you must paste it into cell A1 of the worksheet.
5.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas
button.
A
Totals
Account 1
Account 2
Account 3
Account 4
Amount in dollars
100
390
8321
500
1%
0.5%
3%
4%
1%
1.3%
2.1%
2%
0.5%
3%
1%
4%
Formula
Description
Result
=SUMIFS(B2:E2, B3:E3,
">3%", B4:E4, ">=2%")
500
=SUMIFS(B2:E2, B5:E5,
">=1%", B5:E5, "<=3%",
B4:E4, ">1%")
8711
1
2
3
2.
3.
4.
5.
Press CTRL+C.
In Excel, create a blank workbook or worksheet.
In the worksheet, select cell A1, and press CTRL+V.
IMPORTANT For the example to work properly, you must paste it into cell A1 of the worksheet.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas
button.
A
Daily
First Day
Second
Third
Fourth
1
2
4
5
Measurements
Day
Day
Day
3.3
0.8
5.5
5.5
Average
temperature
(degrees)
55
39
39
57.5
Average wind
speed (miles per
hour)
6.5
19.5
6.5
Formula
Description
Result
=SUMIFS(B2:E2,
B3:E3, ">=40",
B4:E4, "<10")
8.8
EXAMPLE 4: ADDING RAINFALL FOR MORNING AND EVENING PERIODS OF SPECIFIC DAYS
This example expands on the data in Example 3, separating the rainfall, average temperatures, and average
wind speed into two 12-hour periods for each day.
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article.
IMPORTANT Do not select the row or column headers.
2.
3.
4.
5.
Press CTRL+C.
In Excel, create a blank workbook or worksheet.
In the worksheet, select cell A1, and press CTRL+V.
IMPORTANT For the example to work properly, you must paste it into cell A1 of the worksheet.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas
button.
A
First Day
Morning and
Evening
Measurements
Second
Day
Third
Day
Fourth
Day
1.3
1.5
0.8
2.5
56
44
40
38
AM: average
temperature
(degrees)
54
34
38
77
PM: average
temperature
(degrees)
13
33
12
Formula
Description
Result
=SUMIFS(B2:E3,
B4:E5, ">=40",
B6:E7, "<10")
3.5
2.
3.
4.
Press CTRL+C.
In Excel, create a blank workbook or worksheet.
In the worksheet, select cell A1, and press CTRL+V.
IMPORTANT For the example to work properly, you must paste it into cell A1 of the worksheet.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas
button.
5.
Homes
Squ
are
Feet
Bedro
oms
Bat
hs
Gara
ge
Ye
ar
bu
ilt
Price
House1
1200
yes
19
40
$125,
000
House2
1580
1.5
no
19
65
$217,
000
House3
2200
yes
20
03
$376,
000
House4
1750
2.5
yes
20
01
$249,
000
House5
2140
yes
19
98
$199,
000
=">"&FIXED(SUM(1,1),0)
="ye
s"
="y*"
Formula
Description
Resu
lt
=SUMIFS(G2:G6,C2:C6,A7,E2:E6,B7,F2:F6,">1999",F2:
F6,"<2004")
6250
00
=AVERAGEIFS(G2:G6,C2:C6,">2",E2:E6,C7,F2:F6,">19
99",F2:F6,"<2004")
3125
00
2
3
4
5
6
7
8
1
0
See Also