excel count cells with text code example
Example 1: excel count columns with text
=COUNTIF(B4:B8,"*")
Example 2: excel count cells containing specific text
# Count cells containing specific text, ie "a" in "B4:B7":
=SUM(--(MMULT(--(B4:B7="a");TRANSPOSE(COLUMN(B4:B7)))>0))
Example 3: Excel sheet count rows
=COUNTIF(RANGE, CONDITION)
Example: =COUNTIF(C1:C30, "Paris")