#1   Report Post  
nwilson
 
Posts: n/a
Default countif function

can i count how often a word occurs in a cell that has more than one word in
the cell???
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default countif function

Multiple time in just one cell?

=(LEN(A1)-LEN(SUBSTITUTE(A1,"the_word","")))/LEN("the_word")

or once per cell in many cells?

=COUNTIF(A2:A20,"*the_word*")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"nwilson" wrote in message
...
can i count how often a word occurs in a cell that has more than one word

in
the cell???



  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default countif function

For one cell try this:
A1: Sugar
D1: Sugar Plums contain sugar

B1: =(LEN(D1)-LEN(SUBSTITUTE(UPPER(D1),UPPER(A1),"")))/LEN(A1)
returns 2

For multiple cells:
A1: Sugar
D1: Sugar Plums contain sugar
D2: Sugar and Spice
D3: Sugar Bears contain no sugar
D4: Candy Apples contain sugar
D5: Sugar

C1:
=SUMPRODUCT(LEN(D1:D10)-LEN(SUBSTITUTE(UPPER(D1:D10),UPPER(A1),"")))/LEN(A1)
returns 7

Does that help?

€¢€¢€¢€¢€¢€¢€¢€¢€¢€¢
Regards,
Ron


"nwilson" wrote:

can i count how often a word occurs in a cell that has more than one word in
the cell???

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CountIf function Julie Excel Worksheet Functions 2 June 21st 05 10:27 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
COUNTIF and then SUM in Same Function wayne75 Excel Worksheet Functions 1 May 24th 05 11:38 AM
A COUNTIF function Challenge Mr. G. Excel Worksheet Functions 1 April 19th 05 09:04 PM
hOW TO USE THE AND OPERATOR WITH THE COUNTIF FUNCTION Marty Excel Worksheet Functions 1 November 11th 04 09:45 PM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"