How to Use COUNTIF Contains in Google Sheets
COUNTIF is a function in Google Sheets that allows you to count the number of cells that meet a specific criterion within a given range. To use COUNTIF with "contains" functionality, you can use wildcards in the criteria. The asterisk (*) wildcard character represents any series of characters, while the question mark (?) wildcard character represents any single character.
Here's a step-by-step guide on how to use COUNTIF with "contains" in Google Sheets:
- Open your Google Sheet.
- Identify the range of cells where you want to count the cells containing a specific text or value.
- Click on an empty cell where you want the result to be displayed.
- Type the formula using COUNTIF function and wildcards, depending on your criteria:
- To count cells containing a specific text, use
=COUNTIF(range, "*text*")
, replacingrange
with the actual range of cells, andtext
with the specific text you're looking for. - To count cells containing a specific value, use
=COUNTIF(range, "*value*")
, replacingrange
with the actual range of cells, andvalue
with the specific value you're looking for.
- To count cells containing a specific text, use
- Press Enter to get the result.
Example
Let's say you have a list of items in column A (from A2 to A10), and you want to count the cells containing the text "apple":
- Click on an empty cell where you want the result to be displayed, for example, B2.
- Type the formula
=COUNTIF(A2:A10, "*apple*")
and press Enter. - The result will show the number of cells containing the text "apple" in the specified range (A2:A10).
Remember to replace "apple" with your desired text or value and adjust the range accordingly to your data.
Did you find this useful?