To count text in Microsoft excel, we have to use the formula which is called “countif”.
Now we have to pass the arguments range and criteria.
Syntax
The criteria used in COUNTIF supports logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.文章源自LuckYou.ORG-https://luckyou.org/121.html
=COUNTIF(range,criteria)
And for the range you can for example select one whole column. Or you simply select the area that you want to check.文章源自LuckYou.ORG-https://luckyou.org/121.html
count cells which contain text
so we select A1 to A6.文章源自LuckYou.ORG-https://luckyou.org/121.html
Then for the “criteria”, we have to use a wildcard. so now we enter a asterisk in the criteria must be enclosed in double quotes ("").文章源自LuckYou.ORG-https://luckyou.org/121.html
文章源自LuckYou.ORG-https://luckyou.org/121.html
Now when I close the brackets and click the enter key.
You can see that it will count to 4.文章源自LuckYou.ORG-https://luckyou.org/121.html
文章源自LuckYou.ORG-https://luckyou.org/121.html
=COUNTIF(A1:A6,"*") // cells contain any texts
count cells with a "a"
=COUNTIF(A1:A6,"a*") // count cells that begin with "a"
count blank cells
"Countif" can count cells that are black or not black文章源自LuckYou.ORG-https://luckyou.org/121.html
=COUNTIF(A1:A10,"") // blank =COUNTIF(A1:A10,"<>") // not blank
文章源自LuckYou.ORG-https://luckyou.org/121.html
count with ">" "<" "<>" "="
=COUNTIF(A1:A6,">100") // count cells greater than 100 =COUNTIF(A1:A6,">=100") // count cells greater than or equal to 100 =COUNTIF(A1:A6,"<100") // count less than 100 =COUNTIF(A1:A6,"<100") // count less than or equal to 100 =COUNTIF(A1:A6,"<>100") // count not equal to 100 =COUNTIF(A1:A6,"100") // count equal to 100
count cells greater than B1
=COUNTIF(B1:B3,">="&B1) // count cells greater than B1
Comments