The SUMIF function adds the cells specified by a given criteria.

SUMIF takes 2 required arguments and 1 optional argument:

Syntax: SUMIF(range, criteria, [sum_range])

Using the SUMIF function:
The arguments for the SUMIF function are:
Argument Required? Description
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).
A few more things:
The SUMIF function returns incorrect results when you use it to match strings longer than 255 characters to the string #VALUE!.
The sum_range argument does not have to be the same size and shape as the range argument. The actual cells that are added are determined by using the upper leftmost cell in the sum_range argument as the beginning cell, and then including cells that correspond in size and shape to the range argument. For example:

When the range and sum_range arguments in the SUMIF function do not contain the same number of cells, worksheet recalculation may take longer than expected.


The SUMIF function adds the cells specified by a given criteria.
comments powered by Disqus