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
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!