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!!
-
Help Article Resources
Categories
Check out the Formula Handbook template!