excel count number of character in cell code example Example: excel count columns with text =COUNTIF(B4:B8,"*")