Count Unique

CHC Consulting LLC

Active Member
Joined
Aug 14, 2008
Messages
346
Please help!!!


Formula to go in cell AR2....


I need to look up the contents in AP2 in column AP and count the associated unique job numbers in column S. I would also like to add the condition that column A equals "CCAP". Is this possible?

Hopefully this makes sense... I am cross eyed at this point.

TIA

CHC
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Thank you.

Sample job number: A014BEJ

I entered your formula and it returned mostly #N/A's and some 0's. Any other ideas?
 
Last edited:
Upvote 0
Try changing Barry's formula to (since your job numbers are not numeric).
[TABLE="width: 925"]
<colgroup><col width="925"></colgroup><tbody>[TR]
[TD="width: 925"][/TD]
[/TR]
</tbody>[/TABLE]
Code:
[TABLE="width: 925"]
<colgroup><col width="925"></colgroup><tbody>[TR]
   [TD="width: 925"]=SUM(IF(FREQUENCY(IF(AP$2:AP$100=AP2,IF(A$2:A$100="CCAP",MATCH($S$2:$S$100,$S$2:$S$100,0))),ROW($S$2:$S$100)-ROW($S$2)+1),1))[/TD]
 [/TR]
</tbody>[/TABLE]
 
Upvote 0
Try changing Barry's formula to (since your job numbers are not numeric).
[TABLE="width: 925"]
<tbody>[TR]
[TD="width: 925"][/TD]
[/TR]
</tbody>[/TABLE]
Code:
[TABLE="width: 925"]
<tbody>[TR]
[TD="width: 925"]=SUM(IF(FREQUENCY(IF(AP$2:AP$100=AP2,IF(A$2:A$100="CCAP",MATCH($S$2:$S$100,$S$2:$S$100,0))),ROW($S$2:$S$100)-ROW($S$2)+1),1))[/TD]
[/TR]
</tbody>[/TABLE]

Thank you. Unfortunately something went wrong as I got incorrect counts. For example the formula returned a 10, when their were only 3 unique job numbers. Whats even more strange is that there were only 6 rows that matched the column AP condition?
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,611
Members
452,660
Latest member
Zatman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top