Excel formula - count how many times a word appears in a list split down by corresponding field

Hi

I need a formula to to count how many times a word or phase appears in a list, Please note the word or phrase can come in any part of the cell (i.e. have other text before or after it).  
The results need to be broken down by details in a corresponding field (in this instance Gender). the attached spreadsheet has a some sample data and also the output from that sample which I hope helps.  Also embedded below is an image of the data.

Example of data
Can anyone help?
EE-Example.xlsx
correlateAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
I would strongly recommend adjusting the data into a single value of STAT per row, either at the source before it gets in to Excel, or as a first step in the process in Excel (a macro could be created to break it apart).

Once you have the data in that format with one STAT per row, then the result you are after becomes a very simple pivot table, something that Excel is great at.  Attached is an example of what I mean, hope this helps.

EE-Example.xlsx


»bp
correlateAuthor Commented:
Hi Bill,

Thanks for that, normally I would, but there's a lot of different questions to analyse & it would take me ages to break then out.  I did however manage to find Sum Countifs which seems to do the job if I put a wild card in before & after the phrase ...

=SUM(COUNTIFS(UK!$F:$F,"*"&$A16&"*",UK!$B:$B,B$2))

Just checking that through to make sure it fully works
Rob HensonFinance AnalystCommented:
Don't need the SUM bit, just use the COUNTIFS, based on your original sample, formula in E3 and copied down and across:

=COUNTIFS($A$1:$A$9,E$2,$B$1:$B$9,"*"&$D3&"*")

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bill PrewIT / Software Engineering ConsultantCommented:
Ah, I wasn't thinking you would already know all the possible "categories" that could show up in the STAT column.

One thing to keep in mind, that only works well if none of the STAT categories are ever substrings of each other.  For example, if you had:

People
People Skills

Then you could get some double counting.  As it stands not a problem from your example, just something to keep in mind.


»bp
Hakan YılmazSenior Project EngineerCommented:
You may try something like this. I attached file with minor differences. This takes into account the possibility of substrings.
=SUMPRODUCT(--($A$3:$A$9=E$2);--ISNUMBER(FIND(", "&$D3&",";", "&$B$3:$B$9&",")))

Open in new window

EE-Example.xlsx
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.