• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count IF + CountBlank Not working

Hi!

I am not getting the results when I tried to sum Count if result + Countblank. Can anyone advise me please.

=COUNTIF(M7:AQ7,$AP$1)+COUNTBLANK(M7:AQ7)
 
Hi ,

It entirely depends on the data in the range M7:AQ7 , AP1 , and on what according to you the correct result should be.

Probably if you can mention all of the above , it will make it easier to suggest the correct formula.

Narayan
 
Dear Narayan!

I have attached a sample book for better understanding. Can you please look into it.
 

Attachments

  • Sample.xlsm
    510 KB · Views: 6
Hi ,

I am still not fully clear on your requirement , since there is only one sample.

Try this array formula , to be entered using CTRL SHIFT ENTER :

=($A$7 = "PCS") * (COUNTBLANK($M$7:$AQ$7) + SUM(COUNTIF($AP$1:$AT$1, $M$7:$AQ$7)))

Narayan
 
Dear Narayan,

I tried with your formula but it's not working. Sorry for the clarity. I have detailed the info on the attached document. Can you please have a look.
 

Attachments

  • Sample 1.xlsm
    509.7 KB · Views: 1
Hi ,

Please upload your file with the changes you have made to the data.

I am not able to understand the explanation given.

Narayan
 
Really Sorry Narayan, the file is working properly when i checked it again. Actually i for got to press Crtl + Shift + Enter!
 
I have updated the formula and its working now.

=IF(A7="PCS",((A7="PCS")*(COUNTBLANK(M7:AQ7)+SUM(COUNTIF($AP$1:$AT$1,M7:AQ7)))),AS7)
 
Hi ,

Since the IF function is checking for PCS , the formula can be simplified to :

=IF(A7="PCS",COUNTBLANK(M7:AQ7)+SUM(COUNTIF($AP$1:$AT$1,M7:AQ7)),AS7)

entered as an array formula , using CTRL SHIFT ENTER.

Narayan
 
Hi, to all!

Another way (CSE too):
=IF(A7="PCS",SUM(N(M7:AQ7=TRANSPOSE(AO$1:AT$1))),AS7)

Or (without CSE):
=IF(A7="PCS",SUMPRODUCT(COUNTIF(M7:AQ7,AO$1:AT$1&"")),AS7)

Blessings!
 
Back
Top