Table of Contents
The SUMIF function in Google Sheets allows users to check if a cell contains a specific value and sum the corresponding values from another range of cells. This function can be useful for quickly identifying and totaling data that meets a certain criteria. By specifying the criteria and range of cells to be evaluated, the SUMIF function can efficiently determine if a cell contains the desired value and calculate the sum of the matching cells. This can be a helpful tool for organizing and analyzing data in a Google Sheets spreadsheet.
Use SUMIF Contains in Google Sheets
You can use the following formulas in Google Sheets to calculate the sum of cells that contain certain strings:
Method 1: SUMIF Contains (One Criteria)
=SUMIF(A2:A11, "*string*", C2:C11)
This formula takes the sum of values in C2:C11 where the corresponding cell in the range A2:A11 contains “string.”
Method 2: SUMIF Contains (Multiple Criteria)
=SUMIFS(C2:C11,A2:A11,"*string1*",B2:B11,"*string2*")
This formula takes the sum of values in C2:C11 where the cell in the range A2:A11 contains “string1” and the cell in the range B2:B11 contains “string2.”
The following examples show how to use each method in practice.
Example 1: SUMIF Contains (One Criteria)
We can use the following formula to calculate the sum of values in the Points column for the rows where the Team column contains “Mav”:
=SUMIF(A2:A11,"*Mav*",C2:C11)
The following screenshot shows how to use this formula in practice:

From the output we can see that the sum of points for the rows where the team name contains “Mav” is 112.
We can also manually verify this is correct by taking the sum of points for the rows where the team name contains “Mav”:
Sum of Points: 21 + 14 + 19 + 30 + 28 = 112.
Example 2: SUMIF Contains (Multiple Criteria)
=SUMIFS(C2:C11,A2:A11,"*Mav*",B2:B11,"*Gua*")
The following screenshot shows how to use this formula in practice:

From the output we can see that the sum of points for the rows where the team contains “Mav” and the position contains “Guar” is 35.
We can also manually verify this is correct by taking the sum of points for the rows where the team name contains “Mav” and the position contains “Guar”:
Sum of Points: 21 + 14 = 35.
Related:How to Use COUNTIF Contains in Google Sheets
Additional Resources
Cite this article
stats writer (2024). How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-sumif-function-to-check-if-a-cell-contains-a-specific-value-in-google-sheets/
stats writer. "How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-sumif-function-to-check-if-a-cell-contains-a-specific-value-in-google-sheets/.
stats writer. "How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-sumif-function-to-check-if-a-cell-contains-a-specific-value-in-google-sheets/.
stats writer (2024) 'How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-sumif-function-to-check-if-a-cell-contains-a-specific-value-in-google-sheets/.
[1] stats writer, "How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use the SUMIF function to check if a cell contains a specific value in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
