ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I return a unique count where conditions exist? (https://www.excelbanter.com/excel-worksheet-functions/191904-how-do-i-return-unique-count-where-conditions-exist.html)

Cher

How do I return a unique count where conditions exist?
 
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(FREQUENC Y(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A92 16,0))0,1)))

--
Cher

Dreid

How do I return a unique count where conditions exist?
 
Is the error not in your if statement. If(first condition,answer,if(2nd
condition,answer),sum etc,default

Hope that makes sense

"Cher" wrote:

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(FREQUENC Y(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A92 16,0))0,1)))

--
Cher


T. Valko

How do I return a unique count where conditions exist?
 
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" wrote in message
...
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(FREQUENC Y(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A92 16,0))0,1)))

--
Cher




Cher

How do I return a unique count where conditions exist?
 
Thank you very much; it worked
--
Cher


"T. Valko" wrote:

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" wrote in message
...
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(FREQUENC Y(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A92 16,0))0,1)))

--
Cher





T. Valko

How do I return a unique count where conditions exist?
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Cher" wrote in message
...
Thank you very much; it worked
--
Cher


"T. Valko" wrote:

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" wrote in message
...
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(FREQUENC Y(MATCH(A4:A9216,A4:A9216,0)|MATCH(A4:A9216,A4:A92 16,0))0,1)))

--
Cher








All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com