Count cells that contain a specific text and ignore blank in Excel/Sheets
=COUNTIF(A2:A6,"*apple*") // criteria within formula
=COUNTIF(A:A,"*"&C6&"*") // criteria as a cell reference
=COUNTIF(A2:A6,"*apple*") // criteria within formula
=COUNTIF(A:A,"*"&C6&"*") // criteria as a cell reference
=COUNTIF(A2:A6,"*apple*") // criteria within formula
=COUNTIF(A:A,"*"&C6&"*") // criteria as a cell reference
A2:A6 = data range
"*apple*" = criteria
Wildcard: The * character allows for any number (including zero) of other characters to take its place.
π‘ In this example, itβs used to find all cells that include the text "apple". This search is not case-sensitive, so "apple" is considered the same as "Apple" or "APPLE".
=COUNTIF(A2:A6,"*apple*") // criteria within formula
=COUNTIF(A:A,"*"&C6&"*") // criteria as a cell reference
A2:A6 = data range
"*apple*" = criteria
Wildcard: The * character allows for any number (including zero) of other characters to take its place.
π‘ In this example, itβs used to find all cells that include the text "apple". This search is not case-sensitive, so "apple" is considered the same as "Apple" or "APPLE".