Counting specific words in a sibgle cell

DiamondGeezer

New Member
Joined
May 9, 2008
Messages
1
Greetings all you Masters of Excel

What I need to do is count the number of occurrences there are of a given word in a single cell (Excel2007)

example
cell contents = pig pig cow sheep pig horse
how many 'pig'
answer 3
be fab to have a percentage as well e.g 50% of words

Whose got the magic to meet this need?
Thank you
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the MrExcel board!

If the cell might contain, for example, "pig pig cow sheep pig horse pigeon"
then Peter's solution will return 4. If you are looking for just whole words, you might need something like this (though it looks like there should be a simpler way). Formula copied down.

Excel Workbook
ABCD
1pig pig cow sheep pig horse pigeon3pig
2cow sheep pigeon pig horse1
3pig dog1
4dog0
5pig pig pig3
6pig1
7pigeon0
8ape pig pig bat2
Count words
 
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

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