Syntax
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)Arguments
| Argument | Required | Description |
|---|---|---|
sum_range | Required | The cells to add |
criteria_range1 | Required | The cells to check against the first condition |
criteria1 | Required | The first condition, like ">10" or "apple" |
criteria_range2, criteria2 | Optional | More ranges and conditions |
How to use SUMIFS
SUMIFS takes 3 required arguments and 1 optional argument, and accepts more values in the same pattern. Type =SUMIFS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=SUMIFS(A1:A3, B1:B3, "x", C1:C3, ">1")Result Data in the sheet
| A | B | C | |
|---|---|---|---|
| 1 | 10 | x | 1 |
| 2 | 20 | y | 2 |
| 3 | 30 | x | 3 |
Related math functions
- SQRTPIReturns the square root of a number multiplied by pi.
- SUBTOTALReturns a subtotal (sum, average, count and more) of ranges, skipping other subtotals; codes 101 to 111 also skip hidden rows.
- SUMAdds numbers and the numbers in ranges.
- SUMIFAdds the cells that meet a condition.
- SUMPRODUCTMultiplies matching items of arrays or ranges and returns the sum of those products.
- SUMSQReturns the sum of the squares of the numbers.
- SUMX2MY2Returns the sum of the differences of the squares of matching values in two arrays.
- SUMX2PY2Returns the sum of the sums of the squares of matching values in two arrays.
- SUMXMY2Returns the sum of the squares of the differences of matching values in two arrays.