Countif array function not working

G

Guest

Hi
I am using this formula to count
=COUNT(IF((TRIM($C$4:$C$100)="C")*(TRIM($M$4:$M$100)<>"Closed"),$A$4:$A$100))
I am not getting the right results, because column $m$4:$m$100 has blank
cells , so this formula is counting the blank cells.
Please advise how can I correct this formula that is considers blank cells
in coulmn M.

Thanks
 
J

JE McGimpsey

One way (no need to array-enter):

=SUMPRODUCT(--ISNUMBER($A$4:$A$100), --(TRIM($C$4:$C$100)="C"),
--(TRIM($M$4:$M$100)<>"Closed"), --(LEN(TRIM($M$4:$M$100))>0))
 
G

Guest

change your formula as

=COUNT(IF((TRIM($C$4:$C$100)="C")*(TRIM($M$4:$M$100)<>"Closed"),$A$4:$A$100,0))

You were missing the last part of the IF condition, which I added as 0
(zero) in the above formula.

HTH,
 
J

JE McGimpsey

It works in a test workbook for me.

Do you have a #VALUE! error in your data range?

Did you use the formula exactly? If not, did you make sure the range
sizes were the same?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Countif function 2
Count if function 8
SUMPRODUCT ISSUES 2
How to use trim finction in array 3
Double CountIF 5
CountIF 3
rank problem 3
Countif multiple items 2

Top