Syntax

expression.SumIf(Arg1, Arg2, Arg3)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data Type Description
Arg1 Required Range Range - the range of cells that you want evaluated by criteria.
Arg2 Required Variant Criteria - the criteria in the form of a number, expression, or text that defines which cells will be added. For example, criteria can be expressed as 32, "32", ">32", or "apples".
Arg3 Optional Variant Sum_range - the actual cells to add if their corresponding cells in range match criteria. If sum_range is omitted, the cells in range are both evaluated by criteria and added if they match criteria.

Return Value
Double

Remarks


See also: