MindFusion.Wpf Pack Programmer's Guide
SUMIF

Returns the sum of the cells in the specified range that meet the specified criterion.

Syntax  Copy Code

SUMIF( Reference r, Criterion c, [Reference sumRange] )  Number

Parameters

r
Required. A reference that identifies the cells to evaluate.
c
Required. A number or text that defines which cells to sum. For example, 32, "32", ">32", "apples".
sumRange
Optional. The actual cells to add if their corresponding cells in r match c.

Remarks

If the optional range sumRange is specified, then the values of sumRange starting from the top left cell and matching the geometry of r (same number of rows and columns) are summed if the corresponding value in r meets c. The actual range r is not considered. If the resulting range exceeds the sheet bounds (column numbers larger than the maximum column or row numbers larger than the maximum), no error is generated - the cells falling outside are silently ignored.

The criterion can be a number or a text value. If c is a number, the cells match if they contain numbers equal to the criterion or text values equal to the text representation of the criterion. If c is a string that starts with a comparison operator ('<=', '<>', '<', '>=', '>', '=') the cell values match if they satisfy the condition of the criterion. For example, the cell with value 10 will be counted if c is '<15'. Cells with text values cannot satisfy criteria with the following comparison operators: '<=', '<', '>', and '>='. Text comparison is case-insensitive.

Criteria can contain wildcard characters - the question mark (?) and the asterisk (*). A question mark matches any single character, and an asterisk matches any sequence of characters.

Example

Formula  Copy Code

=SUMIF(A1:A5,">1000")

See Also

Function Reference
COUNTIF Function
SUM Function
IF Function