Home > Enterprise >  How to Countifs with one column only counting unique values, and another counting all values except
How to Countifs with one column only counting unique values, and another counting all values except

Time:10-14

I need help with filling out a table. Here's a link to an image of the table and my sample dataset: https://ibb.co/hsyycCC

  1. I have to count all items that are either Size L or S..
  2. ..thats assigned to their owner (John, Mark, Gina)..
  3. ..thats either Colored (Y/N)..
  4. ..that isn't tagged as "Keep"..
  5. But I only have to count all the items with unique IDs (no duplicates)

I can do steps 1-4 with a Countifs function: =countifs(B:B,"<>Keep",C:C,"Yes",D:D,"L",E:E,"John") in cell H3 for example.

But I don't know how to integrate step number 5 to the formula! Can anyone help enlighten me? Thanks!

CodePudding user response:

If you're allowed to add a helper column you could put in cell F2 and drag it down

=IFERROR(MATCH(A2,$A$1:A1,0),"U")

This would flag all the unique values with a U in the helper column . Then in your COUNTIFS function, add the condition

F:F,"U".

There might be a fancier way to do it, but that will get the job done

  • Related