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.
- range – The range of cells that you want to apply the criteria against.
- criteria – The criteria used to determine which cells to add.
- sum_range – [optional] The cells to add together. If sum_range is omitted, the cells in range are added together instead.Some notes that you should be aware of:
When sum_range is omitted, the cells in range will be summed.
- Text criteria, or criteria that includes math operators, must be enclosed in double quotation marks (“).
- Numeric criteria can be supplied without quotation marks.
- The wildcard characters ? and * can be used in criteria. A question mark matches any one character and an asterisk matches any sequence of characters.
- To find a literal question mark or asterisk, use a tilde (~) in front question mark or asterisk (i.e. ~?, ~*).