How do i countif this one?

Cossie

Active Member
Joined
May 6, 2002
Messages
327
I need to count the number of times a word appears in a series of cells.

I currently use =COUNTIF($B$2:$B$5,"*drama*") but have to change "drama" everytime to something else like "english". Is there an easir way to do this? Have pasted an example below and. Thanks you :biggrin:
Book2
ABCD
2Drama/English/LOTE/Library/Maths/Music/TAS/IndividualpreparationtimeHSIE/LearningSupport/PDHPE/Science/VisArts/Individualpreparationtime
3Drama/English/LOTE/Library/Maths/Music/TAS/IndividualpreparationtimeHSIE/LearningSupport/PDHPE/Science/VisArts/Individualpreparationtime
4Drama/English/LOTE/Library/Maths/Music/TAS/IndividualpreparationtimeHSIE/LearningSupport/PDHPE/Science/VisArts/Individualpreparationtime
5Drama/English/LOTE/Library/Maths/Music/TAS/IndividualpreparationtimeHSIE/LearningSupport/PDHPE/Science/VisArts/Individualpreparationtime
6
7Drama04
Sheet1
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

tactps

Well-known Member
Joined
Jan 20, 2004
Messages
3,460
Change it to:
=COUNTIF($A$2:$A$5,"*"&A7&"*")

Then every time you change A7, it will update.
 

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
Try this:

=COUNTIF($B$2:$B$5,"*"&D1&"*")

Where D1 contains the word you want to count (e.g. "Drama"). Hope that helps!

P.S. The FAQ for the HTML Maker add-in has intructions for use, so that you won't see "" all over when you post a sheet.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,074
Messages
5,835,223
Members
430,348
Latest member
agnes88fe

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
Top