Unique count of a column based on text in another column

srkreignz

New Member
Joined
Aug 22, 2014
Messages
27
Hi,

What I have 2 columns
Column A Column B
John India, China
Jeffy US
Justine US, India
John China
John India

I would like to get the unique count of column A, for say India which will be entered by the user. So it should be case sensitive.

I tried the array formula

=SUM(IF(FREQUENCY(IF(B2:B10="*"&C2&"*",A2:A10),A2:A10)>0,1))

So that it searches string inside a text. This doesnt work this way..Please help.

Also tried
the array formula

=SUM(IF(FREQUENCY(IF(Sheet1!B2:B10="*"&C2&"*",IF(Sheet1!A2:A10<>"",MATCH(Sheet1!A2:A10,Sheet1!A2:A10,0))),ROW(Sheet1!A2:A10)-ROW(Sheet1!A2)+1),1))

Doesnt work thos as well.
Please help
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You can't use wildcards in a test for equality. Try:

=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH(C2,B2:B10)),IF(A2:A10<>"",MATCH(A2:A10,A2:A10,0))),ROW(A2:A10)-ROW(A2)+1),1))

confirmed with Ctrl+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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