Google-sheets – Wildcard for any value including blank

formulasgoogle sheets

According to COUNTIF the documentation,

criterion can contain wildcards including ? to match any single character or * to match zero or more contiguous characters.

But this is incorrect because * doesn't match an empty cell.

How can I match any value, including blank?

Best Answer

Using a * doesn't work because an empty cell does not have zero characters; it's basically 'undefined'. It does not match any COUNTIF criterion you can think of. This is how it's intended to be used: Test* matches both 'Test' and 'Test2':

enter image description here

To count empty cells, you'll need COUNTBLANK:

enter image description here