How do I return a unique count where conditions exist?

C

Cher

How do I return a unique count where conditions exist? This works until I
try to add conditions. HELP!!!

This works:
=SUM(IF(FREQUENCY(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A9216,0))>0,1))

When I add conditions it doesn't:
(IF(B4:B9216,"HO")+IF(C4:C9216,"P")SUM(IF(FREQUENCY(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A9216,0))>0,1)))
 
D

DReid

Is the error not in your if statement. If(first condition,answer,if(2nd
condition,answer),sum etc,default

Hope that makes sense
 
T

T. Valko

So, you want to count unique entries in col A where B = HO and C = P ?

Try this array formula** :

=COUNT(1/FREQUENCY(IF((B4:B9216="HO")*(C4:C9216="P"),MATCH(A4:A9216,A4:A9216,0)),ROW(A4:A9216)-MIN(ROW(A4:A9216))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
 
C

Cher

Thank you very much; it worked
--
Cher


T. Valko said:
So, you want to count unique entries in col A where B = HO and C = P ?

Try this array formula** :

=COUNT(1/FREQUENCY(IF((B4:B9216="HO")*(C4:C9216="P"),MATCH(A4:A9216,A4:A9216,0)),ROW(A4:A9216)-MIN(ROW(A4:A9216))+1))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
 

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