, sum range
range is the range to which the criteria are to be applied.
criteria is the cell in which the search criterion is shown, or the search criterion itself. If the criteria is written into the formula, it must be surrounded by double quotation marks. Criteria can also include wildcard characters. To represent any single character, use ? (question mark) in the text that specifies the condition. To represent any number of consecutive characters, use * (asterisk). For example, use B* to match all entries that begin with B, and B??? to match all entries that begin with B and contain three other characters. To represent an actual question mark or asterisk, use ~ (tilde) to precede the ? or *.
sum range is the range from which values are summed. If this parameter has not been indicated, the values found in the range are summed.
To sum up only negative numbers: =SUMIF(A1:A10,"<0")
sums values from the range B1:B10 only if the corresponding values in the range A1:A10 are >0.
See COUNTIF() for syntax examples that can be used with SUMIF().
Parent topic: Mathematical functions