SOLVED

Highlighted
Contributor

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

I have the following table:

 O1 P1 Q1 AA AB AC AD AE I I 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
Highlighted
Solution

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

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,"")

Highlighted

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

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!
Highlighted

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

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

Highlighted

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

Thank you so much for helping, Jan!