Table of Contents
COUNTIF is a function in Google Sheets that allows you to count the number of cells within a range that meet a certain criteria. When using this function, you can also include wildcards, which are symbols that represent any character or combination of characters, to broaden the scope of your search. This means that you can use COUNTIF to count cells that contain a specific pattern or text, rather than an exact match. To use COUNTIF with wildcards in Google Sheets, you simply need to add the desired wildcard symbol, such as an asterisk (*) or question mark (?), within your search criteria. This allows for more flexible and efficient data analysis in your spreadsheet.
Use COUNTIF with Wildcards in Google Sheets
You can use the following formulas in Google Sheets to use wildcard characters with the COUNTIF function:
Formula 1: COUNTIF with One Wildcard
=COUNTIF(A2:A11, "*string*")
This particular formula counts the number of cells in the range A2:A11 that contain “string” anywhere in the cell.
Formula 2: COUNTIF with Multiple Wildcards
=COUNTIFS(A2:A11, "*string1*", B2:B11, "*string2*")
This particular formula counts the number of cells where A2:A11 contains “string1” and where B2:B11 contains “string2.”
The following examples show how to use each formula in practice.
Example 1: COUNTIF with One Wildcard
We can use the following formula to count the number of cells in column A that contain “avs” anywhere in the cell:
=COUNTIF(A2:A11, "*avs*")
The following screenshot shows how to use this formula in practice:

From the output we can see that there are 5 cells in column A that contain “avs” in the name.
Example 2: COUNTIF with Multiple Wildcards
We can use the following formula to count the number of rows where A2:A11 contains “avs” and where B2:B11 contains “Gua”:
=COUNTIFS(A2:A11, "*avs*",B2:B11,"*Gua*")

From the output we can see that there are 2 rows where the team contains “avs” and the position contains “Gua” somewhere in the cell.
Additional Resources
Cite this article
stats writer (2024). How do I use COUNTIF with wildcards in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-use-countif-with-wildcards-in-google-sheets/
stats writer. "How do I use COUNTIF with wildcards in Google Sheets?." PSYCHOLOGICAL SCALES, 29 Jun. 2024, https://scales.arabpsychology.com/stats/how-do-i-use-countif-with-wildcards-in-google-sheets/.
stats writer. "How do I use COUNTIF with wildcards in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-use-countif-with-wildcards-in-google-sheets/.
stats writer (2024) 'How do I use COUNTIF with wildcards in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-use-countif-with-wildcards-in-google-sheets/.
[1] stats writer, "How do I use COUNTIF with wildcards in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How do I use COUNTIF with wildcards in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
