Excel - Count cells with text. If you need to count the number of cells with text in Excel, you can use the COUNTIF function: =COUNTIF(A2:D10,*) Here A2:D10 is your range with data and * is a wildcard matching any number of characters. Just enter the formula with the correct range to any cell where you want to see the result and press Enter.