The SUMIF Function


The Excel SUMIF function returns the sum of cells that meet a single condition. Criteria can be applied to dates, numbers, and text. The SUMIF function supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.

You use the SUMIF function to sum the values in a range that meet criteria that you specify. For example, suppose that in a column that contains numbers, you want to sum only the values that are larger than 5. You can use the following formula: =SUMIF(B2:B25,”>5″)


SUMIF(range, criteria, [sum_range])

The SUMIF function syntax has the following arguments:

  • 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. The selected range may contain dates in standard Excel format (examples below).
  • 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. Wildcard characters can be included – a question mark (?) to match any single character, an asterisk (*) to match any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character. For example, criteria can be expressed as 32, “>32”, B5, “3?”, “apple*”, “*~?”, or TODAY(). Important: Any text criteria or any criteria that includes logical or mathematical symbols must be enclosed in double quotation marks (). If the criteria is numeric, double quotation marks are not required.
  • 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). Sum_range should be the same size and shape as range. If it isn’t, performance may suffer, and the formula will sum a range of cells that starts with the first cell in sum_range but has the same dimensions as range.

Usage notes 

The SUMIF function returns the sum of cells in a range that meet a single condition. The first argument is the range to apply criteria to, the second argument is the criteria, and the last argument is the range containing values to sum. SUMIF supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.  Criteria can use a value in another cell, as explained below.

SUMIF is in a group of eight functions in Excel that split logical criteria into two parts (range + criteria). As a result, the syntax used to construct criteria is different, and SUMIF requires a cell range for the range argument, you can’t use an array.

SUMIF only supports a single condition. If you need to apply multiple criteria, use the SUMIFS function. If you need to manipulate values that appear in the range argument (i.e. extract the year from dates to use in criteria) see the SUMPRODUCT and/or FILTER functions.

How to use the Excel SUMIF Function

Leave Comment

Your email address will not be published. Required fields are marked *

OCL Learning | Training, Consulting, Certification