What does this function do?
Add the cells specified by a given condition or criteria.
Syntax:
SUMIF(range, criteria, [sum_range])
- range (required): The range of cells that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored.
- criteria (required): The criteria in the form of a number, expression, a cell reference, text, or a function that defines which cells will be added. For example, criteria can be expressed as 32, ">32", B5, 32, "32", "apples", or TODAY().
- sum_range (optional): The actual cells to add, if you want to add cells other than those specified in the range argument. If the sum_range argument is omitted, Excel adds the cells that are specified in the range argument (the same cells to which the criteria is applied).
Examples:
Imagine we have the following range A1: B32 | 5 |
3 | 3 |
4 | 2 |
=SUMIF(A1:A3 ">2") = Sum the values in A1:A3 which are greater than 2 = 7
=SUMIF(A1:A3, ">2", B1: B3) = Sum values B1:B3 as long as the values in A1: A3 are greater than 2 = 5
No comments:
Post a Comment