Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using COUNTIFS to count blank when cell has a formula

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.

like image 748
user3331363 Avatar asked Mar 12 '14 19:03

user3331363


People also ask

How do you count blank cells if another cell meets criteria?

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.

Does the Countif function count blank cells?

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.

How do you use blank in Countifs?

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.


1 Answers

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))

like image 127
barry houdini Avatar answered Nov 15 '22 15:11

barry houdini