Count text string in column

JMP

New Member
Joined
Dec 2, 2009
Messages
2
Hi All,

I am trying to create a formula that counts the number of times a specific text string appears in a column.
Within the column, the text string may appear within a larger text string within a cell.

For example, Column D has 15000 rows with various text messages.
I need to count how many times the text string "is mandatory" appears. This text string will often have text preceding or following it.

Hope someone can help!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello and welcome

Try.
Excel Workbook
DEF
1btris mandatoryis mandatory10
2is mandatoryif
3is mandatory
4go,is mandatory.yop
5ggtis mandatoryii
6is mandatory
7is mandatoryyu
8is mandatory
9yyeis mandatory
10is mandatory
Sheet1
Excel 2007
Cell Formulas
RangeFormula
F1=COUNTIF(D1:D10,"*"&E1&"*")
 
Upvote 0
Fantastic, thanks for your help.

That was pretty easy, but I was on the right track with COUNTIF; I just couldn't use it properly!
 
Upvote 0
Hello and welcome

Try.

Sheet1
DEF
1btris mandatoryis mandatory10
2is mandatoryif
3is mandatory
4go,is mandatory.yop
5ggtis mandatoryii
6is mandatory
7is mandatoryyu
8is mandatory
9yyeis mandatory
10is mandatory

<thead>
</thead><tbody>
</tbody>
Excel 2007

Worksheet Formulas
CellFormula
F1=COUNTIF(D1:D10,"*"&E1&"*")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Hi - I'm replying to this old thread, rather than starting a new one on basically the same subject :)

is it possible to do this to count WITHOUT a text string?
I suppose, <count all> minus <count with string> would work, but is there a specific 'countifnot'?

thanks

Barry
 
Upvote 0
Ah - doesn't like the brackets -

"I suppose, (count all) <count all="" style="color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">minus (countif) <count with="" string="">would work, but is there a specific 'countifnot'?"</count></count>
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,834
Members
449,471
Latest member
lachbee

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