The Excel SUMIFS function is similar to the Excel SUM function that adds values from a range together, but with the added benefit of being able to add multiple criteria or conditions you specify. Think of it as a conditional SUM function. The close relative of the SUMIFS function is the Excel SUMIF function, the only major difference between the two is that you can specify multiple conditions in the SUMIFS, while only one condition with the SUMIF function.
The SUMIFS function has 3 required arguments (input data separated by commas), then up to an optional 127 pairs of criteria_range and criteria arguments. The syntax is as follows:
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2],[criteria2],...)
|1||Number||54||Looks for any number equal to 54|
|2||Expression||">100"||Looks for any number greater than 100|
|3||Cell Reference||A15||Looks for any value equal to the value in cell A15|
|4||Wildcard||"W*"||Looks for any value that starts with a W|
|5||Function||=TODAY()||Looks for any value that matches the current date|
Important Note: Text criteria and criteria that include logical operator symbols ( >, <, <=, >=, =, <>) must be surrounded by double quotation marks (
" ") in Excel
|1||?||Single character wildcard|
|2||*||Wildcard string of undefined length|
|3||~||Used when you want to use one of the wildcard characters as an actual criteria (e.g. a question mark is actually part of the text) Example: "What~?"|
Use this data for the following function examples.
|1||Name||Employee ID||Sales Region||Region Code||Sales||New Customers||Commission|
If we wanted to get the total amount of sales from region code 542 only for employee 1005 in the Excel table above, we could write:
The function would return the value of $2000. In D2:D8 it would have found a match in cells D3, D4, and D6. Then it would perform the matching for Criteria2 in cells B2:B8 and only find a match in cells B4 and B7. It would then take the corresponding values from the sum range where both conditions are met. The only record in the data that matches both conditions would be in row 4 since D4 and B4 would both evaluate to TRUE and pass the criteria we were looking for.
In the above Excel table, if we wanted to add together to Total amount of sales from all employees in the West region that sold more than $4000 worth of products, we would construct a SUMIFS function as follows:
The function would return the value of $20,000. In E2:E8 it would have found a match in all rows except row 4. It then checks the Criteria2 and finds a match on cells C3, C4, C6. The only records (rows) that have a match to both Criteria1 and Criteria2 would be rows 3 and 6, which add up to $20,000. It would disregard the other rows that match only 1 of the criteria.
In the above Excel table, if we wanted to add together to Total Commission amounts from all employees whose names ended with the letter N in the East region, we would do the following:
The function would return the value of $19,000. In A2:A8 it would have found a match in cells A2 (Hugh Jackman), A4 (Scarlett Johansson), A5 (Raymond Reddington), and A6 (Elizabeth Keen), and A7(Scarlett Johansson). In C2:C8 it would have found matches in cells C2, C5, and C8. It would then SUM the cells in G2:G8 (Commission) that are on rows that match all conditions. Both conditions are met on rows 2 and 5.
The SUMIFS function in the tutorial is only one of many belonging to the group of SUM functions in Excel. There are many summing functions in Excel used for a variety of other tasks shown below:
If adding cells together without any rules, use the SUM function.
If adding cells that must meet one specific criteria, use the SUMIF function.
If adding cells that must meet multiple criteria, use the SUMIFS function.