• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Counting text combinations in a row

Fredo

New Member
Hi,


I'm new to this forum. I've been reading it for some time, and I really like it. It has helped me a lot in my work.


I have a question that I couldn't find the answer to on this (or any) forum.


My database is a long list of people that work for several companies. I want to count the times people work for the same company. My list is now like this:


Person x / Company A / Company B / Company C / et cetera

Person y / Company D / Company A / Company E / et cetera

Person z / Company B / Company C / et cetera

Et cetera


So in this example, the most combinations appear once, but B-C twice. A perfect result for me would therefore be:


A-B 1

A-C 1

...

B-C 2

...


Is there a way to make excel do this?


Thanks!
 
Hi Fredo,


Welcome to the forum, does this help?


https://www.dropbox.com/s/6mpnv2nalqh6pd5/Counting%20in%20a%20row.xls
 
oldchippy thanks, but it is not exactly what i meant. Now I can count the companies, but not the combination of two companies in one row. Is there a way to achieve that?
 
Hi Fredo ,


Can you copy + paste about 10 rows of data from your worksheet ? Your first post does not give an exact picture of what each cell / row contains.


Narayan
 
Hi,

Also, could you explain the connection between your need to count the number of times someone worked for a given company, and you counting combinations of companies?

-Sajan.
 
Hey,


Here's a made-up list. This is what it's gonna look like:

[pre]
Code:
Name	CMP 1	CMP 2	CMP 3	CMP 4	CMP 5
Jones	Siemens	Microsoft 	Shell
Baker	Apple	IBM	Yahoo	Google	Boeing	Kodak
Doe	Shell	Exxon
Williams	Apple	Microsoft
Johnson	Nokia	Shell	Exxon
Davis	Microsoft	Siemens
Miller	Google	Yahoo
Taylor	IBM	Apple	Boeing
Jackson	Honda	Boeing	IBM
[/pre]

I don't think I was completely clear before. What I want to count is the number of times people have worked for the same combination of companies. So, for example, Jones and Davis both worked for Microsoft and Siemens. That combination occurs twice. Taylor, Baker and Jackson all worked for IBM and Boeing. So that combination occurs 3 times.


Thank
 
Narayan,


I hope to have these combinations as a result. With the number of times they appear. Because it will be quite a large database, there will probably be a lot of combinations.


Fredo
 
Hi, Fredo!

Yes, of course it makes it easier, but not easy, so if I were you, I'd answer something like "Thanks for asking, in fact it'd be ideal to have combinations of N elements, where N is a variable value entered in cell N1".

You'll always have time to say "Ok, if it's so difficult, I'd settle for N=2 for the time being".

Regards!

PS: I know I'm making a lot of new friends with this :p
 
Back
Top