Table of Contents
The SUMIFS function in Excel is a powerful tool that allows users to calculate the sum of a range of cells based on multiple criteria. This function takes into account both numeric and non-numeric criteria, making it a versatile and efficient way to perform calculations. By specifying the range of cells to be evaluated and the criteria to be met, the SUMIFS function can accurately add up only the values that meet all specified conditions. This feature is especially useful when dealing with large data sets and allows for precise and customizable calculations. Using the SUMIFS function can greatly streamline data analysis and simplify complex calculations in Excel.
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(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …)
=SUMIFS(A2:A9,B2:B9,”=A*”,C2:C9,”Tom”)
=SUMIFS(A2:A9,B2:B9,”<>Bananas”,C2:C9,”Tom”)
Argument name | Description |
|---|---|
Sum_range (required) | The range of cells to sum. |
Criteria_range1 (required) | The range that is tested using Criteria1. Criteria_range1 and Criteria1 set up a search pair whereby a range is searched for specific criteria. Once items in the range are found, their corresponding values in Sum_range are added. |
Criteria1 (required) | The criteria that defines which cells in Criteria_range1 will be added. For example, criteria can be entered as 32, “>32”, B4, “apples”, or “32”. |
Criteria_range2, criteria2, … (optional) | Additional ranges and their associated criteria. You can enter up to 127 range/criteria pairs. |
Examples
To use these examples in Excel, drag to select the data in the table, right-click the selection, and pick Copy. In a new worksheet, right-click cell A1 and pick Match Destination Formatting under Paste Options.
Quantity Sold | Product | Salesperson |
|---|---|---|
5 | Apples | Tom |
4 | Apples | Sarah |
15 | Artichokes | Tom |
3 | Artichokes | Sarah |
22 | Bananas | Tom |
12 | Bananas | Sarah |
10 | Carrots | Tom |
33 | Carrots | Sarah |
Formula | Description | |
=SUMIFS(A2:A9, B2:B9, “=A*”, C2:C9, “Tom”) | Adds the number of products that begin with A and were sold by Tom. It uses the wildcard character * in Criteria1, “=A*” to look for matching product names in Criteria_range1 B2:B9, and looks for the name “Tom” in Criteria_range2 C2:C9. It then adds the numbers in Sum_range A2:A9 that meet both conditions. The result is 20. | |
=SUMIFS(A2:A9, B2:B9, “<>Bananas”, C2:C9, “Tom”) | Adds the number of products that aren’t bananas and are sold by Tom. It excludes bananas by using <> in the Criteria1, “<>Bananas”, and looks for the name “Tom” in Criteria_range2 C2:C9. It then adds the numbers in Sum_range A2:A9 that meet both conditions. The result is 30. |
Best practices
Do this | Description |
|---|---|
Use wildcard characters. | Using wildcard characters like the question mark (?) and asterisk (*) in criteria1,2 can help you find matches that are similar but not exact. A question mark matches any single character. An asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) in front of the question mark. For example, =SUMIFS(A2:A9, B2:B9, “=A*”, C2:C9, “To?”) will add all instances with name that begin with “To” and ends with a last letter that could vary. |
Understand the difference between SUMIF and SUMIFS. | The order of arguments differ between SUMIFS and SUMIF. In particular, the sum_range argument is the first argument in SUMIFS, but it is the third argument in SUMIF. This is a common source of problems using these functions. If you’re copying and editing these similar functions, make sure you put the arguments in the correct order. |
Use the same number of rows and columns for range arguments. | The Criteria_range argument must contain the same number of rows and columns as the Sum_range argument. |
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.
See Also
See a video on how to use advanced IF functions like SUMIFS
The SUMIF function adds only the values that meet a single criteria
The COUNTIF function counts only the values that meet a single criteria
The COUNTIFS function counts only the values that meet multiple criteria
IFS function (Microsoft 365, Excel 2016 and later)
Cite this article
stats writer (2024). How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-sumifs-function-in-excel-to-calculate-the-sum-of-a-range-of-cells-based-on-multiple-criteria/
stats writer. "How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-sumifs-function-in-excel-to-calculate-the-sum-of-a-range-of-cells-based-on-multiple-criteria/.
stats writer. "How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-sumifs-function-in-excel-to-calculate-the-sum-of-a-range-of-cells-based-on-multiple-criteria/.
stats writer (2024) 'How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-sumifs-function-in-excel-to-calculate-the-sum-of-a-range-of-cells-based-on-multiple-criteria/.
[1] stats writer, "How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.
stats writer. How can I use the SUMIFS function in Excel to calculate the sum of a range of cells based on multiple criteria?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
