Combining Countif & OR Function
I am trying to write a formula that will count the number of rows where either column A (External Successor) is not blank OR column B (Internal successor) is not blank.
=COUNTIF(OR({Internal Bench} = <>"", {External Bench} = <>""))
Answers
-
Are you looking for something like this?
=COUNTIF({Internal Bench},<>"") + COUNTIF({External Bench},<>"")
-
HI Michael,
I dont want to add the two countifs together, because that will count some rows twice if they have both external and internal bench not blank.
I want to count if external OR internal bench are not blank. But if External and internal bench are both not blank then i want it to only count that row once. Any ideas?
-
This may be a goofy way to do it but what about this?
=COUNTIFS([Internal Bench]:[Internal Bench], <>"", [External Bench]:[External Bench], "") + COUNTIFS([Internal Bench]:[Internal Bench], "", [External Bench]:[External Bench], <>"") + COUNTIFS([Internal Bench]:[Internal Bench], <>"", [External Bench]:[External Bench], <>"")
-
I messed it up:
Here you go
=COUNTIFS([Internal Bench]:[Internal Bench], <>"", [External Bench]:[External Bench], "") + COUNTIFS([Internal Bench]:[Internal Bench], "", [External Bench]:[External Bench], <>"") + COUNTIFS([Internal Bench]:[Internal Bench], <>"", [External Bench]:[External Bench], <>"")
-
I think this is counting rows where:
- Internal bench is not blank and external bench is blank PLUS
- Internal bench is blank and external bench is not blank PLUS
- Internal bench and external bench are both not blank.
So any row where Internal Bench and External bench are both not blank is being counted more than once.
Do you think there is a way to use an OR function and look counting if internal OR external are not blank?
I so appreciate your help!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.7K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!