• 504K Members
• 2,066 Online
• 602K Conversations

New Contributor

# COUNTIFS using criteria from both column A and B

I can't figure out how to combine the formulas =COUNTIF(B:B,"IHC*")+COUNTIF(B:B,"SS*") and =COUNTIFS(A:A,">1330",A:A,"<1431")

I want to only count the criteria in column A if the criteria in column B is also met.

Thank you,

5 Replies

# Re: COUNTIFS using criteria from both column A and B

Hi Anna,

You probably need to do 2 COUNTIFS given you want to count IHC* or SS*

=COUNTIFS(A:A,">1330",A:A,"<1431",B:B,"IHC*") + COUNTIFS(A:A,">1330",A:A,"<1431",B:B,"SS*")
Highlighted

# Re: COUNTIFS using criteria from both column A and B

Or bit more compact =SUM(COUNTIFS(B:B,{"SS*";"IHC*"},A:A,">1330",A:A,"<1431"))

# Re: COUNTIFS using criteria from both column A and B

Thank you, it worked!

# Re: COUNTIFS using criteria from both column A and B

Thank you! I don't understand this one, but it gave me the same result as above! :smileyhappy:

# Re: COUNTIFS using criteria from both column A and B

Anna, that is the imitation of OR condition. In brief, COUNTIFS on array of conditions also generates an array, after that you just take the sum of it. Like SUM({5,7})=12

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies