Count Uniques with a Couple Conditions

R

ryguy7272

I am trying to match names (with many duplicates) in a sheet2, with a list of
names (no duplicates) in a Summary Sheet. Then for each name, count unique
numbers in columnG, of sheet2 ONLY IF, the dollar value in columnV is >0.

This is my function
=SUMPRODUCT((sheet2!$C$2:$C$678=C56)/COUNTIF(sheet2!$G$2:$G$678,sheet2!$G$2:$G$678&"")*sheet2!$V$2:$V$678>0)

The logic seems right to me, but I’m getting all zeros and I know some of
the conditions that I mentioned above are true so I should not have all zeros.

Any ideas?

Thanks,
Ryan---
 
R

ryguy7272

This is getting close, but it counts only uniques in ColumnG, not the uniques
in ColumnG which have a value in the ColumnV of the same row that is grteater
than 0:
=SUMPRODUCT(--(sheet2!$C$2:$C$678=C58)*(1/COUNTIF(sheet2!$G$2:$G$678,sheet2!$G$2:$G$678)*sheet2!$V$2:$V$678>0))
 
R

ryguy7272

Finally got it
=COUNT(1/FREQUENCY(IF(sheet2!$C$2:$C$1000=C56,sheet2!$G$2:$G$1000),sheet2!$G$2:$G$1000))-(SUMPRODUCT((sheet2!$C$2:$C$1000=C56)*(sheet2!$V$2:$V$1000<=0)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top