Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I return a unique count where conditions exist?

6 views
Skip to first unread message

Cher

unread,
Jun 19, 2008, 12:28:00 PM6/19/08
to
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)))

--
Cher

DReid

unread,
Jun 19, 2008, 12:46:00 PM6/19/08
to
Is the error not in your if statement. If(first condition,answer,if(2nd
condition,answer),sum etc,default

Hope that makes sense

T. Valko

unread,
Jun 19, 2008, 1:11:05 PM6/19/08
to
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)

--
Biff
Microsoft Excel MVP


"Cher" <Ch...@discussions.microsoft.com> wrote in message
news:856A6FFC-E0A0-484D...@microsoft.com...

Cher

unread,
Jun 20, 2008, 9:00:01 AM6/20/08
to
Thank you very much; it worked
--
Cher

T. Valko

unread,
Jun 20, 2008, 1:00:00 PM6/20/08
to
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Cher" <Ch...@discussions.microsoft.com> wrote in message

news:C901DBB0-0146-46BC...@microsoft.com...

0 new messages