Excel function

SUMIFSfunction

Adds only the values in rows that meet all of several conditions.

All versions
=SUMIFS(D2:D9, A2:A9, "Seoul", C2:C9, ">=20")
Range to drag
A
B
C
D
1
2
3
4
5
6
7
8
9

Drag the corner dots to change sum_range, criteria_range1, criteria_range2. Click a cell in the criteria range to use its value as the criteria. Move the bottom handle of sum_range up one row. The ranges no longer match and you get #VALUE!. Try breaking it on purpose to see the errors.

Result

141000

sum_range
D2:D9Drag a corner dot up/down to resize, sideways to change the column

The column to add. In SUMIFS it comes first.

criteria_range1
A2:A9

The column checked by the first condition.

criteria1

The first condition.

criteria_range2
C2:C9

The column checked by the second condition.

criteria2

The second condition.

What is the SUMIFS function?

=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

SUMIFS adds the values in rows that meet every condition you give it. A row is added only if all conditions are TRUE for that row.

Unlike SUMIF, the range to add comes first. All ranges must be the same size, or SUMIFS returns #VALUE!.

Arguments

sum_range
The cells to add.
criteria_range1
The cells checked by criteria1.
criteria1
The condition. Type a value such as "Seoul", a comparison such as ">=20" or "<>Seoul", or a wildcard pattern such as "B*" (* for any characters, ? for one character). Text and comparisons go in double quotes.
criteria_range2, criteria2
More range/condition pairs. Up to 127 pairs are allowed.

SUMIFS examples

  1. Example 1. Seoul sales with quantity 20 or more

    =SUMIFS(D2:D9, A2:A9, "Seoul", C2:C9, ">=20")

    Rows 2 and 7 match both conditions. 45000 + 96000 = 141000.

  2. Example 2. Everything except one branch

    =SUMIFS(D2:D9, A2:A9, "<>Seoul")

    <> means "not equal". This adds the sales of every branch except Seoul.

Common mistakes

FAQ

Can I use SUMIFS with just one condition?
Yes. Many people use SUMIFS everywhere so that the argument order is always the same.