ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting instances of words in a worksheet cell (https://www.excelbanter.com/excel-discussion-misc-queries/2360-counting-instances-words-worksheet-cell.html)

CJ

counting instances of words in a worksheet cell
 
I would like to be able to count the instances of "apple" in the
following example, where each line is the value in one cell:

column 1

x apple
apple x
x x
x apple x

to get the answer = 4 instances of apple.

How can I do this in excel?

any help greatly appreciated

CJ

JulieD

Hi CJ

getting the answer 4 from the given example would be difficult, however, if
you'ld settle for 3 then use the following formula

=COUNTIF(A1:A4,"*apple*")

Cheers
JulieD

"CJ" wrote in message
om...
I would like to be able to count the instances of "apple" in the
following example, where each line is the value in one cell:

column 1

x apple
apple x
x x
x apple x

to get the answer = 4 instances of apple.

How can I do this in excel?

any help greatly appreciated

CJ




tjtjjtjt

The word apple is always on a cell by itself?
=COUNTIF(your_range,"apple")

If it isn't, then try:
=COUNTIF(your_range,"*"&"apple"&"*")

TJ

"CJ" wrote:

I would like to be able to count the instances of "apple" in the
following example, where each line is the value in one cell:

column 1

x apple
apple x
x x
x apple x

to get the answer = 4 instances of apple.

How can I do this in excel?

any help greatly appreciated

CJ



All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com