In mathematics, the equal sign (=) describes equality between numbers. You can use the SUMIF function to have the sum of the numbers that equal a value (e.g., =300).
Example: You are working with a worksheet with the product in column A, the amount in column B, and the profit/loss in column C.
Question: What is the sum of values that equal 300 in column B?
= SUMIF(B2:B10,"300")
The result returns 900.
Question: What is the sum of values in column B that are not 300?
= SUMIF(B2:B10,"<>300")
The result returns 4,166.
Question: What is the sum of numbers in column C when the corresponding cells in column B are 300?
= SUMIF(B2:B10,"300", C2:C10)
The result returns -106.22.
Notes: The SUMIF Function
The SUMIF function is to sum the values in a range that meet criteria that you specify.
Formula:
=SUMIF(range, criteria, [sum_range])
Explanations:
– Range is required; the range of cells that you want evaluated by criteria.
– Criteria is required; the criteria that defines which cells will be added.