Counting frequency based on Unique values in 2 columns

Brunts

Board Regular
Joined
May 23, 2008
Messages
85
Office Version
  1. 2016
Platform
  1. Windows
Here's the type of data I'm dealing with. I know that it would be considerably easier if it was one row per defect, but each row on the defect has other unique information in it (That I don't need for the summary) but do for other purposes so can't delete it)

[TABLE="width: 602"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[TD]Column E[/TD]
[TD]Column F[/TD]
[TD]Column G[/TD]
[TD]Column H[/TD]
[/TR]
[TR]
[TD]Row 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 2[/TD]
[TD] [/TD]
[TD]Defect No[/TD]
[TD]Defect Outcome[/TD]
[TD] [/TD]
[TD]No of Defects[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 3[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]Pass[/TD]
[TD] [/TD]
[TD]Pass[/TD]
[TD]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 4[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]Pass[/TD]
[TD] [/TD]
[TD](blank)[/TD]
[TD]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 5[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]Pass[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 6[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]Pass[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 7[/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]Pass[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Row 8[/TD]
[TD] [/TD]
[TD]1[/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D] [/TD]
[/TR]
</tbody><colgroup><col><col span="2"><col><col><col><col><col></colgroup>[/TABLE]

The values in Column D will always be the same for each Unique Defect No (Except in error, but no need to cater for!) and I have no idea how many Defects there will be, so presume a range of up to 500 will suffice.
What I'm after is a formula for Cell G3 that will confirm a count of Unique Defect Nos that have the pass criteria or blank value. Been trawling 'internet and having no luck with sumproducts, countif, array formulas etc.

thx
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
This may do what you want.
Will the defect always be all of one number passes or fails?
With the formulas below if row 10 had a pass and the other rows for defect# 2 are blank it will show 3 pass and 1 fail.

These are array formulas and must be entered with CTRL-SHIFT-ENTER.
If your defect numbers are numeric and not text you could use the formula in I3 & I4.
Excel Workbook
ABCDEFGHI
1Row 1
2Row 2Defect NoDefect OutcomeNo of Defects
3Row 31PassPass22
4Row 41PassBlank11
5Row 51Pass
6Row 61Pass
7Row 71Pass
8Row 81Pass
9Row 92
10Row 102
11Row 112
12Row 122
13Row 132
14Row 143Pass
15Row 153Pass
16Row 163Pass
17Row 173Pass
18Row 183Pass
Sheet
 
Upvote 0
Solution
That certainly explains why I couldn't work it out - works a treat - well done you
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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