Count Multiple Unique Values with Wildcards

Diamond_D

New Member
Joined
Nov 16, 2017
Messages
2
I need help with a formula to count unique values in one column that match data in another column but using a wildcard. Column A has multiple names repeated in sequence and column B has data for every occurrence of a name. I want to be able to count the number of names that have Text in a cell in column B and only count once. So, in the example table Fred, John and Carl would all equal 1. Formula needs to count Text (with wildcard) but only once per person.

[TABLE="width: 257"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]Text123[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]Data[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]Data[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Text231[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Data[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Text254[/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD]Text123[/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD]Data[/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD]Text231[/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD]Data[/TD]
[/TR]
</tbody>[/TABLE]

Hope you can help
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Welcome to the forum.

Try:

=SUM(SIGN(FREQUENCY(IF(ISNUMBER(SEARCH("text",B2:B11)),MATCH(A2:A11,A2:A11,0)),ROW(A2:A11)-ROW(A2)+1)))

confirmed with Control+Shift+Enter when you enter it into the formula bar, not just Enter.
 
Upvote 0
Welcome to the forum.

Try:

=SUM(SIGN(FREQUENCY(IF(ISNUMBER(SEARCH("text",B2:B11)),MATCH(A2:A11,A2:A11,0)),ROW(A2:A11)-ROW(A2)+1)))

confirmed with Control+Shift+Enter when you enter it into the formula bar, not just Enter.

Thanks Eric, worked a treat!
 
Upvote 0

Forum statistics

Threads
1,224,763
Messages
6,180,826
Members
452,997
Latest member
gimamabe71

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