What SUMIFS does
SUMIFS adds up the numbers on the rows that meet several conditions at once, such as the North region’s desk sales or one person’s hours on one project. A row’s number is added only when every condition is true. SUMIF tests one condition, and SUMIFS can test up to 127.
The first argument is the column to add. After it come pairs of a range to test and the condition for that range, as many as you need, and the ranges line up row by row with the column you’re adding.
Conditions can come from cells, so a report can let someone pick the region and the dates while the formula stays the same.
Syntax
sum_rangeRequired- The numbers to add, such as the amounts in
C2:C7. In SUMIFS this comes first. criteria_range1Required- The first range to test, such as the region column
A2:A7. It must be the same size assum_range. criteria1Required- The condition for that range:
"North",">500", a number, or a cell. Join an operator to a cell with &:">="&B1. criteria_range2Optional, can repeat- The next range to test, such as the product column
B2:B7, again the same size. criteria2Optional, can repeat- The condition for that range. Add more pairs as you need them, up to 127; a row is added only when it meets every condition.
Example: one region’s sales of one product
Sales are listed with a region in column A, a product in column B and the amount in column C.
Read it as: add C2:C7 where A2:A7 says North and B2:B7 says Desk. Row 4 is a North sale but a chair, and row 6 is a desk sold in the East, so neither is added.
Example: total the invoices from a date on
To add the invoices dated on or after a start date kept in B1:
Add a second pair, A4:A8,"<="&B2, with an end date in B2, and the formula totals one period. Change the dates in B1 and B2 and the total follows.
Several values in one column (OR)
SUMIFS joins its conditions with AND: a row is added only when it passes every test, and one cell can’t say North and South at the same time. To add the desk sales of the North or the South, write one SUMIFS per region and add them: =SUMIFS(C2:C7,A2:A7,"North",B2:B7,"Desk")+SUMIFS(C2:C7,A2:A7,"South",B2:B7,"Desk") returns 2,950 (2,000 + 950) on the sales above.
With a longer list, put the values in curly braces and wrap the formula in SUM: =SUM(SUMIFS(C2:C7,A2:A7,{"North","South"},B2:B7,"Desk")) gives the same 2,950.
Common mistakes
- SUMIFS starts with the range to add, and SUMIF ends with it. Written in SUMIF’s order,
=SUMIFS(A2:A7,"North",C2:C7)gives an error or a wrong total. - The range to add and every range you test must cover the same rows.
C2:C7withA2:A8gives#VALUE!. =SUMIFS(C2:C7,A2:A7,"North",A2:A7,"South")returns 0, because no row is in both regions. For one region or the other, add two SUMIFS together.- A date typed into a condition as text, like “16/03/2026”, can be read as a different day on another computer. Keep the date in a cell and refer to it with
">="&B1, or build it with DATE, as in">="&DATE(2026,3,16).
Frequently asked questions
How many conditions can SUMIFS take?
Up to 127 pairs of range and condition. A row’s number is added only when it meets every one of them.
How do I use SUMIFS between two dates?
Test the date column twice: =SUMIFS(B2:B50,A2:A50,">="&E1,A2:A50,"<="&E2) adds the rows from the date in E1 to the date in E2, both included.
How do I use not equal to in SUMIFS?
Put <> in front of the value: =SUMIFS(C2:C7,A2:A7,"North",B2:B7,"<>Desk") adds the North sales of everything except desks. To leave out the value in a cell, join it on with "<>"&E1; "<>" on its own means the cell isn’t blank.
Why does SUMIFS return 0 or #VALUE!?
0 means no row met every condition. Test each condition on its own with COUNTIFS to find the one that matches nothing, such as a typo or a trailing space in the data. #VALUE! means the ranges aren’t all the same size.
Does SUMIFS work with wildcards?
Yes, in text conditions: "*desk*" matches any product name that contains “desk”. An asterisk stands for any characters and a question mark for one.