I'm trying to count a group of people in column 1 and 2, but I don't want to double count them.
For example, I want to count David on Column 1 or 2, but if David is on both columns 1 and 2, I don't want it to count David twice only once. How do I do that? I've used the formula below but it counted 141 instead of 101. Not sure what I am missing but I'd appreciate your help!
COUNTIFS({LCS}, OR(@cell = "name", @cell = "name", @cell = "name", @cell = "name", @cell = "name"), {LCO}, OR(@cell <> "name", @cell <> "name", @cell <> "name", @cell <> "name", @cell <> "name", ISBLANK(@cell))) + COUNTIF({LCO}, OR(@cell = "name", @cell = "name", @cell = "name", @cell = "name", @cell = "name"))
Best Answer
-
The idea is to count column 1 then count column 2 but add in the criteria of column 1 not containing those names.
=COUNTIFS({Column 1}, OR(@cell = "John", @cell = "Amy"))
+
COUNTIFS({Column 2}, OR(@cell = "John", @cell = "Amy"), {Column 1}, AND(@cell <> "John", @cell <> "Amy"))
Answers
-
Also, I forgot to mention, I'd like to do this for like 5 people in 2 columns!
So, I'd like to count how many times David, Sarah, Tyra, Nathan, and Jim are on column 1 or 2, but I don't want to double count when the row has David and Sarah. I only want that to be counted once if that makes sense.
-
The idea is to count column 1 then count column 2 but add in the criteria of column 1 not containing those names.
=COUNTIFS({Column 1}, OR(@cell = "John", @cell = "Amy"))
+
COUNTIFS({Column 2}, OR(@cell = "John", @cell = "Amy"), {Column 1}, AND(@cell <> "John", @cell <> "Amy"))
-
Thank you @Paul Newcome!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!