SOLVED

Help needed with putting a value in a specific cell using COUNTIF?

Iron Contributor

I have the following table:

   

O1P1Q1AAABACADAE
   II  I
        
        
        

 
1. How can I make it so that if there is a I in either AA or AB then there is a 1 in O1?

 

I am not sure how to do this.

 

2. How can I make it so that if there is a I in AE then there is a 1 in P1?

 

=IF(SUM(COUNTIF($AE,{"i"})),"1","") - this doesn't seem to work properly when I drag down the formula for the entire AE column.

 

3. How can I make it so that if there are no Is in any column between AC and AD then there is a 1 in Q1?

 

=IF(SUM(COUNTIF($AC:$AD,{"i"})),"1","") - this doesn't seem to work properly when I drag down the formula for the entire AI column.

 

Many thanks.

 

4 Replies
best response confirmed by ianwuk (Iron Contributor)
Solution

1: =IF(COUNTIF(AA1:AB1,"I")=1,1,"")

this only returns 1 if there is exactly 1 "I" in AA and AB. If you need it to also return 1 if there is an "I" in both AA and AB:

=IF(COUNTIF(AA1:AB1,"I")>1,1,"")

 

2: =IF(AE1="I",1,"")

 

3: =IF(COUNTIF(AC1:AD1,"I")=0,1,"")

I have another related queston please Jan,

How can I make this formula?

If there is an I or C in cells AB5 to AI5 THEN "" ELSE 1

Many thanks!

=IF(COUNTIF(AB5:AI5,"I")+COUNTIF(AB5:AI5,"I")>=1,"",1)

Thank you so much for helping, Jan!
1 best response

Accepted Solutions
best response confirmed by ianwuk (Iron Contributor)
Solution

1: =IF(COUNTIF(AA1:AB1,"I")=1,1,"")

this only returns 1 if there is exactly 1 "I" in AA and AB. If you need it to also return 1 if there is an "I" in both AA and AB:

=IF(COUNTIF(AA1:AB1,"I")>1,1,"")

 

2: =IF(AE1="I",1,"")

 

3: =IF(COUNTIF(AC1:AD1,"I")=0,1,"")

View solution in original post