Home > Net >  How to avoid duplicate counts in column A while also checking if columns A and B meet a criteria
How to avoid duplicate counts in column A while also checking if columns A and B meet a criteria

Time:03-28

I have two columns. Column A and B.

Column A Column B
Mark Orange
Sarah Apple, Orange
Sarah Apple, Orange
Luke Apple, Lemon
Jane Apple

Column A contains duplicates, 'Sarah' in this example, which I wish to keep included in the table. I've been trying to count how many 'Apple' are in column B. While counting Sarah only once.

I'm really stuck here. I figured how to apply a formula but only for each cell individually.

How to count unique values for column A "=COUNTUNIQUE(A1:A2)" and how to count the apple in column B with "=COUNTIF(B1:B2, " * Apple * ")"

But I wasn't able to find any answers in regards to counting both column A and B after they meet their criteria.

The count should be 3 but I'm stuck with 4 instead.

Any help would be appreciated. Thank you.

EDIT: @Harun24HR solved it! Thank you very much! I'll delete the sheet but I wanted to share a screenshot of the table and solution in case anyone needs it. enter image description here

  • Related