When this formula is entered, the result is $192. This is the sum of numbers in the range F5:F16 when cells in C5:C15 contain “Red”. Note that the SUMIFS function is not case-sensitive.

### SUMIFS solution

In the example shown, the solution is based on the SUMIFS function. The formula in cell I5 is: In this formula, sum_range is F5:F16, criteria_range1 is C5:C16, and criteria1 is “red”. The result ($192) is the sum of numbers in the range F5:F16 when cells in C5:C15 contain “Red”. Note that the SUMIFS function is not case-sensitive. With a criteria of “red”, SUMIFS will match “RED”, “Red”, and “red”. Also note that in the SUMIFS function, sum_range always comes first. To use SUMIFS to calculate a conditional sum when the state is Texas (state = “TX”), you can use a formula like this: In this formula, sum_range is again F5:F16, criteria_range1 is D5:D16, and criteria1 is “tx”. For more information about using SUMIFS to apply multiple criteria with logical operators (>,<,<>,=) and wildcards (*,?), see this page.

### SUMIF solution

The SUMIF function is an older function in Excel that supports only a single condition. To solve this problem with the SUMIF function, you can use a formula like this: In this formula, range is D5:D16, criteria is “tx”, and sum_range is again F5:F16. Note that in the SUMIF function, sum_range always comes last. The result ($192) is the same as with the SUMIFS function above. For more information about using SUMIF to apply criteria with logical operators (>,<,<>,=) and wildcards (*,?), see this page. Whether you use SUMIFS or SUMIF is a matter of personal preference. SUMIFS was introduced in Excel 2007, so it’s been around now for a long time.

### Notes

For a case-sensitive solution, see this formula. To match a substring in a cell, see this formula. To sum if not equal to, see this formula.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.