Forum Discussion
laws120
Feb 24, 2025Copper Contributor
Counting cells containing spaces
I'm trying to count a column of cells which contain a string of numbers, dashes and spaces. I would like to count the cells which only contain spaces. I've tried: =COUNTIFS(C3:C10000,"*",C3:C10000,...
m_tarler
Feb 25, 2025Bronze Contributor
I though of countif with " *" but was concerned because that would also count any cell with text that starts with a space (e.g. " - - - "). I was also surprised you didn't submit a REGEXP solution. I really need to learn those expression rules better ....
SergeiBaklan
Feb 25, 2025Diamond Contributor
You are right, " *" doesn't work in such case. As for regex, equivalent of SUMPRODUCT
=SUM(--REGEXTEST( C3:C10000, "^\s*$"))