I have criteria where I need to count if a column B is not blank. But I have a formula in Cell B, So if I do a simple
=Countifs(B1:B10,"<>")
This returns the count of the cells which have the formula but I just need the blanks when the formula does not populate anything.
COUNTIF Blank There are 2 ways to count blank cells in a certain range. One is to use a formula with a wildcard character, an asterisk (*) for text values and the other is to use (“ ”) as a criterion to count all empty cells. =COUNTIF(range,”<>”&”*”) means to count cells that do not contain any text.
COUNTA does not count empty cells. COUNTIF is an Excel function to count cells in a range that meet a single condition. COUNTIF can be used to count cells that contain dates, numbers, and text.
Using COUNTIF and COUNTIFS Because you want to count empty cells, you can use a blank text string as your criteria. To use COUNTIF, open your Google Sheets spreadsheet and click on a blank cell. Type =COUNTIF(range,"") , replacing range with your chosen cell range.
Try this formula
[edited as per comments]
To count populated cells but not "" use
=COUNTIF(B:B,"*?")
That counts text values, for numbers
=COUNT(B:B)
If you have text and numbers combine the two
=COUNTIF(B:B,"*?")+COUNT(B:B)
or with SUMPRODUCT - the opposite of my original suggestion
=SUMPRODUCT((B:B<>"")*(B:B<>0))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With