Forum Discussion

JORDAN BITTICKS's avatar
JORDAN BITTICKS
Copper Contributor
Aug 03, 2018

Formula help If(Countif for multiple range)

I am trying to write a formula to count  a singular "1" if any number of No's appears within 2 distinct ranges.

 

So if no in B30, and/or B33:37 need to count as 1 what I have now is. 

 

=IF(Countif('Sheet 18'!B33:B37,"no"),"1","0")+IF(Countif('Sheet 18'!B30,"no"),"-1","0")+IF(Countif('Sheet 17'!B33:B37,"no"),"1","0")+IF(Countif('Sheet 17'!B30,"no"),"-1","0") .... etc etc

 

The issue here is that if there is a "no" in 33 and a "no" in 30 it counts 2.  <Or> functions do not appear to work because range is in same column and criteria is the same too. 

 

Example:  I am reviewing if each of 18 students has packed correctly for a trip. Each student has a checklist which will feed into a summary sheet that tells me how many children got a "no" in the section 30 and 33:37 (excluding line 31 and 32 ).

I cannot change the checklist or the order of questions. In the image the formula counts this as 3 students instead of 2 that are missing multiple items.

 

 

My workbook is getting bogged down w 20 checklists each containing data validation drop downs (yes or no's) in addition to the linked data / formulas across 

 

I have looked into array formulas as well as pivot tables but I fear those options will bog down the workbook even more, complicate things for my team,  as well as deviate from controlled format of these documents. Basically its gotta be a formula and I cant change the format/ order of questions

 

The concept here is simple, and I know its out there but I am totally stuck. 

 

pls and thank you!!! 

 

 

  • Hi Jordan,

     

    As for formula question you may use

    =(Countif('Sheet 18'!B33:B37,"no")>0)*('Sheet 18'!B30="no")
    • JORDAN BITTICKS's avatar
      JORDAN BITTICKS
      Copper Contributor

      Hi Sergei! I appreciate your assistance. I tried your formula, but unfortunately I am finding that it is not working. Perhaps you can help me see what I have done wrong? 

      please and thank you! 

       

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Jordan, perhaps I misunderstood your logic. You need 1 then both B30, B33:B37 have "no", or only one of them or what?

Resources