Empty cells and cells that contain numeric values or errors should not be included in the count.
This problem can be solved with the COUNTIF function or the SUMPRODUCT function.
Both approaches are explained below.
For convenience,datais thenamed rangeB5:B15.
The asterisk (*) matches zero or more characters of any kind.
We want to matchalltext values.
To do this, we provide the asterisk (*) by itself for criteria.
SUMPRODUCT function
Another way to solve this problem is to use theSUMPRODUCT functionwith theISTEXT function.
SUMPRODUCT makes it easy to perform alogical teston a range, and then count the results.
The test is performed with the ISTEXT function.
Note: the SUMPRODUCT formulas above may seem complex, but usingBoolean operations in array formulasis powerful and flexible.
NOT Function
The Excel NOT function returns the opposite of a given logical or Boolean value.
When given TRUE, NOT returns FALSE.
When given FALSE, NOT returns TRUE.
Use the NOT function to reverse a logical value.