COUNTIF with or + and variables

  • Thread starter Dancest☆r
  • Start date
D

Dancest☆r

I'm having a hard time figuring this one out

My challenge is to count if column is "A" or "B" and column [K]
and [O] are "C"


I'm trying to count all the ones in column [J] that meet the specific
conditions.
I tried an array but it didn't seem to take.

Any hints are greatly appreciated.
 
M

Ms-Exl-Learner

Try this…

=COUNTIF(I:I,"A")+COUNTIF(I:I,"B")+COUNTIF(K:K,"C")+COUNTIF(O:O,"C")

Remember to Click Yes, if this post helps!
 
R

Rob van Gelder

In J1, use this formula, then fill down.
=IF(AND(OR(I1="A", I1="B"), K1="C", O1="C"), 1, 0)

Cheers,
Rob
 
D

David Biddulph

No, because there were two "AND"s and one "OR" in the OPs request.
--
David Biddulph

Ms-Exl-Learner said:
Try this.

=COUNTIF(I:I,"A")+COUNTIF(I:I,"B")+COUNTIF(K:K,"C")+COUNTIF(O:O,"C")

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


Dancest?r said:
I'm having a hard time figuring this one out

My challenge is to count if column is "A" or "B" and column [K]
and [O] are "C"


I'm trying to count all the ones in column [J] that meet the specific
conditions.
I tried an array but it didn't seem to take.

Any hints are greatly appreciated.
.
 
D

David Biddulph

or to put it all in one formula:
=SUMPRODUCT((I1:I100="A")+( I1:I100="B"), --(K1:K100="C"), --(O1:O100="C"))
--
David Biddulph

Rob van Gelder said:
In J1, use this formula, then fill down.
=IF(AND(OR(I1="A", I1="B"), K1="C", O1="C"), 1, 0)

Cheers,
Rob


Dancest?r said:
I'm having a hard time figuring this one out

My challenge is to count if column is "A" or "B" and column [K]
and [O] are "C"


I'm trying to count all the ones in column [J] that meet the specific
conditions.
I tried an array but it didn't seem to take.

Any hints are greatly appreciated.
 
J

Jacob Skaria

---If you are looking to have the count as 1 for each row in Col J then try
the below in cell J1 and copy down

=IF(AND(OR(I1="A",I1="B"),K1="C",O1="C"),1,0)

---If you want the sum of the count you can use the below formula which will
get the count for the rows 1 to 100

=SUMPRODUCT((I1:I100={"A","B"})*(K1:K100="C")*(O1:O100="C"))
 

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

Top