Countif problem with testing for non-blank cells

Copper Contributor

I've created a COUNTIF function to summarise data from a table, where one of the criteria I want to use is whether a particular cell is empty. Ideally, I wanted to use the ISBLANK function but I could not work out how to include it in my COUNTIF, so followed some advice from the internet to test for "*" instead.

 

The formula I'm using is:

=COUNTIFS(_GC_Status,Summary!$A5,_GC_Index,Summary!D$4&"*",_GC_Closed_date,"*")

where _GC_Status, _GC_Index and _GC_Closed_date are ranges in my data table, and Summary!$A5 and Summary!D$4 are row and column labels that correspond to text entries in the data table. 

The problem is with the third criteria - this seems to count correctly when the cell contains a text entry but skips when it contains a date entry. 

 

Ideas on how to fix this would be much appreciated.

6 Replies

@Jalil2503 

Try ">0" instead of "*".

 

Now it is counting the cells with dates in but skipping the ones with text, so the opposite of my previous problem.

 

 

@Jalil2503 

Why is there text in a *date* column?

Move the text to another column.

 

Because of data input errors, which I have to live with.

I think what I will do is add the result of the countif using "*" and the result of the countif using ">0", which should capture both data types.

@Jalil2503 

You can use data validation to force certain inputs or avoid certain inputs.

 

That's the next step on this project!