Sum ifs
SUMIFS Function¶
The SUMIFS function in Excel sums the values in a range based on multiple criteria. It's a powerful tool for
aggregating data when you have more than one condition to meet.
Syntax:¶
SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
- sum_range: The range of cells to be added if the conditions are met.
- criteria_range1: The first range of cells to evaluate against the first condition (
criteria1). - criteria1: The condition applied to
criteria_range1. This can be a number, expression, cell reference, or text. - criteria_range2, criteria2, ... (optional): Additional ranges and their corresponding conditions. Each range is evaluated with its respective condition.
Examples:¶
-
=SUMIFS(B1:B10, A1:A10, ">20")
Sums the values inB1:B10where the corresponding cells inA1:A10are greater than 20. -
=SUMIFS(C1:C10, A1:A10, ">=10", B1:B10, "<5")
Sums the values inC1:C10where the corresponding cells inA1:A10are greater than or equal to 10 and the corresponding cells inB1:B10are less than 5. -
=SUMIFS(D1:D10, B1:B10, "Apples", C1:C10, "Red")
Sums the values inD1:D10where the corresponding cells inB1:B10contain "Apples" and the corresponding cells inC1:C10contain "Red".
Usage Notes:¶
- All ranges (
sum_range,criteria_range1,criteria_range2, etc.) must have the same size and shape, or Excel will return an error. - The function works with logical conditions (e.g.,
>,<,=) and supports wildcards (*and?) for text conditions.*matches any sequence of characters.?matches a single character.
SUMIFSsupports multiple conditions joined with an implicit "AND." For conditions joined with "OR," you may need to use separateSUMIFSfunctions combined with+.
Note: Ensure your data is consistent and ranges are properly aligned for accurate results.