Counting problem

sharshra

Active Member
Joined
Mar 20, 2013
Messages
404
Office Version
  1. 365
I have a table with one of the field having comma separated values. I want to count for each value in that field how many items are there. I´m sure there must be a simple way to do this.

For example, consider the table below. It has name of sales person & regions they cover. I would like to have a formula to list down how many sales persons are there for each region. Note that the actual table has thousands of values. I have taken just 4 rows for illustration.

Table -
Book1
CD
3NameRegion
4JamesParis, London, Madrid
5RogerLondon, Zurich
6ThomasZurich, Berlin, Paris, Warsaw
7AnthonyParis, Madrid
Sheet1


Output required -
Book1
EF
8RegionNo. of sales persons
9Paris3
10London2
11Madrid2
12Zurich2
13Berlin1
14Warsaw1
Sheet1
 
Thank you very much, @Fluff (y) You made my day :love: It works perfectly as expected.

I still have problem with running this formula in another worksheet, though correct sheet name is given. But that´s not a major concern & I can live with it for now. However, would like to fix to make it a complete solution. Will try it later.

Marking Fluff´s post #20 as the solution.

@Cubist , Thanks for your VBA code. I´m sure your VBA code will be useful & will be using it too for some other requirements.
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I still have problem with running this formula in another worksheet, though correct sheet name is given
Make sure the sheet name does not have any leading/trailing spaces.
Also is the table a proper table, or just a normal range?
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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