Table of Contents
COUNTIF is a function in Google Sheets that allows users to count the number of cells within a specified range that meet a certain criteria. By using this function, it is possible to check if a cell contains a specific value by setting the criteria to the desired value. This can be useful for data analysis and organization purposes, as it helps to quickly identify and count cells that meet a certain condition. Overall, the COUNTIF function can effectively be used to check for the presence of a specific value within a cell in Google Sheets.
Use COUNTIF Contains in Google Sheets
You can use the following formulas in Google Sheets to count the number of cells that contain certain strings:
Method 1: COUNTIF Contains (One Criteria)
=COUNTIF(A2:A11, "*string*")
This formula counts the number of cells in A2:A11 that contain “string” anywhere in the cell.
Method 2: COUNTIF Contains (Multiple Criteria)
=COUNTIFS(A2:A11,"*string1*",B2:B11,"*string2*")
This formula counts the number of rows where the cell in the range A2:A11 contains “string1” and the cell in the range B2:B11 contains “string2.”
Note: The * operator is a wildcard character in Google Sheets.
The following examples show how to use each method in practice.
Example 1: COUNTIF Contains (One Criteria)
We can use the following formula to count the number of cells in the Team column that contain the string “Mav”:
=COUNTIF(A2:A11,"*Mav*")
The following screenshot shows how to use this formula in practice:

From the output we can see that 5 rows in the Team column contain “Mav” somewhere in their cell.
Example 2: COUNTIF Contains (Multiple Criteria)
We can use the following formula to count the number of rows where the Team column contains “Mav” and the Position column contains “Guar”:
=COUNTIFS(A2:A11,"*Mav*",B2:B11,"*Guar*")
The following screenshot shows how to use this formula in practice:

From the output we can see that 2 rows contain “Mav” in the Team column and “Guar” in the Position column.
Cite this article
stats writer (2024). How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-countif-to-check-if-a-cell-in-google-sheets-contains-a-specific-value/
stats writer. "How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”." PSYCHOLOGICAL SCALES, 26 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-countif-to-check-if-a-cell-in-google-sheets-contains-a-specific-value/.
stats writer. "How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-countif-to-check-if-a-cell-in-google-sheets-contains-a-specific-value/.
stats writer (2024) 'How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-countif-to-check-if-a-cell-in-google-sheets-contains-a-specific-value/.
[1] stats writer, "How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use COUNTIF to check if a cell in Google Sheets contains a specific value?”. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
