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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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


Row\Col
A​
B​
1​
Vendor NameMinority Supplier
2​
GoyaY
3​
GoyaY
4​
MonacoN
5​
ShastaY
6​
NogalesY
7​
8​
3​

<tbody>
</tbody>
 
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,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

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