Duplicate Value Counting

canthony24

Board Regular
Joined
Mar 24, 2016
Messages
70
Looking to solve this issue I'm trying to figure out. I need a formula to return the count of suppliers that have "Y" in their respective column.

Here is a small subset of data:

A1 = Vendor Name B1 = Minority Supplier
A2 = Goya B2 = Y
A3 = Goya B3 = Y
A4 = Monaco B4 = N
A5 = Shasta B5 = Y
A6 = Nogales B6 = Y

Now, these could have duplicate lines, like A2:A3. So A2:A50 could be Goya and B2:B50 could have all "Y". I want to return just the specific number of Vendors that have Y. In that subset, the answer would be 3, not 4. I want to avoid a pivot table if possible.

Thanks for the help if possible!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
maybe something like....

A8=SUM(IF(FREQUENCY(IF(B2:B6="y",MATCH(A2:A6,A2:A6,0)),ROW(A2:A6)-ROW(A2)+1),1)) Control Shift Enter


[TABLE="class: grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]Vendor Name[/TD]
[TD]Minority Supplier[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]Goya[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]Goya[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]Monaco[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]Shasta[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD]Nogales[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]
3​
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Perfect. How would in incorporate this if I want the formula to be in another sheet that reads the data? A8 is the cell of sheet I want it in, and the data lives in 'Source Data'
 
Upvote 0
something like...

=SUM(IF(FREQUENCY(IF('source data'!B2:B6="y",MATCH('source data'!A2:A6,'source data'!A2:A6,0)),ROW('source data'!A2:A6)-ROW('source data'!A2)+1),1)) Control Shift Enter
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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