1.SUMIF-SUMIFS Function
1.SUMIF-SUMIFS Function
You use the SUMIF function to sum the values in a range that meet
criteria that you specify. For example, suppose that in a column that
contains numbers, you want to sum only the values that are larger
than 5. You can use the following formula: =SUMIF(B2:B25,">5")
Tips:
▪ If you want, you can apply the criteria to one range and
sum the corresponding values in a different range. For
example, the formula =SUMIF(B2:B5, "John",
C2:C5) sums only the values in the range C2:C5, where
the corresponding cells in the range B2:B5 equal "John."
▪ To sum cells based on multiple criteria, follows SUMIFS
function.
Syntax
Examples
Example 1
Copy the example data in the following table, and paste it in cell A1
of a new Excel worksheet. For formulas to show results, select them,
press F2, and then press Enter. If you need to, you can adjust the
column widths to see all the data.
Example 2
Copy the example data in the following table, and paste it in cell A1
of a new Excel worksheet. For formulas to show results, select them,
press F2, and then press Enter. If you need to, you can adjust the
column widths to see all the data.
SUMIFS function
The SUMIFS function, one of the math and trig functions, adds all
of its arguments that meet multiple criteria. For example, you would
use SUMIFS to sum the number of retailers in the country who (1)
reside in a single zip code and (2) whose profits exceed a specific
dollar value.
Syntax
▪ =SUMIFS(A2:A9,B2:B9,"=A*",C2:C9,"Tom")
▪ =SUMIFS(A2:A9,B2:B9,"<>Bananas",C2:C9,"Tom")
Examples
Common Problems
Problem Description
0 (Zero) is shown instead Make sure Criteria1,2 are in quotation
of the expected result. marks if you are testing for text values, like
a person's name.
The result is incorrect TRUE and FALSE values
when Sum_range has for Sum_range are evaluated differently,
TRUE or FALSE values. which may cause unexpected results when
they're added.
Best practices
Do this Description
Use wildcard Using wildcard characters like the question mark
characters. (?) and asterisk (*) in criteria1,2 can help you find
matches that are similar but not exact.