Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Count the words in a cell

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?

Say A1 contains a series of text ....

1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level

How can I count number of "O" in the cell A1 please?

Thanks
Elton
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count the words in a cell

Try this...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))

Note that SUBSTITUTE is case sensitive.

--
Biff
Microsoft Excel MVP


"Elton Law" wrote in message
...
Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?

Say A1 contains a series of text ....

1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level

How can I count number of "O" in the cell A1 please?

Thanks
Elton



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Count the words in a cell

=LEN(A1)-LEN(SUBSTITUTE(A1,"o",""))

It's case sensitive, so if you all "O" or "o", repeat the whole formula
substituting the other case and add the two results:
=(LEN(A1)-LEN(SUBSTITUTE(A1,"o","")))+(LEN(A1)-LEN(SUBSTITUTE(A1,"O","")))

Hope this helps,

Hutch

"Elton Law" wrote:

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?

Say A1 contains a series of text ....

1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level

How can I count number of "O" in the cell A1 please?

Thanks
Elton

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default Count the words in a cell

On Thu, 20 May 2010 10:22:01 -0700, Elton Law
wrote:

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?

Say A1 contains a series of text ....

1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level

How can I count number of "O" in the cell A1 please?

Thanks
Elton



Try the following formula:

=SUMPRODUCT(--(MID(A1,ROW(1:999),1)="o"))

The 999 in the formula should be any number not less than the number
of characters in the text.
With the given example text, the returned value is 8.

Hope this helps / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Count the words in a cell

On 20 Mai, 18:30, "T. Valko" wrote:
Try this...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))

Note that SUBSTITUTE is case sensitive.

--
Biff
Microsoft Excel MVP

"Elton Law" wrote in message

...

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?


Say A1 contains a series of text ....


1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level


How can I count number of "O" in the cell A1 please?


Thanks
Elton


Hi Biff,

I like that UPPER("O") part :-)

Have fun,
Bernd


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default Count the words in a cell

On Thu, 20 May 2010 11:24:51 -0700 (PDT), Bernd P
wrote:

On 20 Mai, 18:30, "T. Valko" wrote:
Try this...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))

Note that SUBSTITUTE is case sensitive.

--
Biff
Microsoft Excel MVP

"Elton Law" wrote in message

...

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?


Say A1 contains a series of text ....


1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level


How can I count number of "O" in the cell A1 please?


Thanks
Elton


Hi Biff,

I like that UPPER("O") part :-)

Have fun,
Bernd


To be really sure, make it TRIM(LEFT(UPPER("O"))) :-)

Lars-Åke

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count the words in a cell

I like that UPPER("O") part

So then you know why it's there?

--
Biff
Microsoft Excel MVP


"Bernd P" wrote in message
...
On 20 Mai, 18:30, "T. Valko" wrote:
Try this...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))

Note that SUBSTITUTE is case sensitive.

--
Biff
Microsoft Excel MVP

"Elton Law" wrote in message

...

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?


Say A1 contains a series of text ....


1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level


How can I count number of "O" in the cell A1 please?


Thanks
Elton


Hi Biff,

I like that UPPER("O") part :-)

Have fun,
Bernd



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Count the words in a cell

On 20 Mai, 20:38, Lars-Åke Aspelin wrote:
On Thu, 20 May 2010 11:24:51 -0700 (PDT), Bernd P



wrote:
On 20 Mai, 18:30, "T. Valko" wrote:
Try this...


=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))


Note that SUBSTITUTE is case sensitive.


--
Biff
Microsoft Excel MVP


"Elton Law" wrote in message


...


Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?


Say A1 contains a series of text ....


1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level


How can I count number of "O" in the cell A1 please?


Thanks
Elton


Hi Biff,


I like that UPPER("O") part :-)


Have fun,
Bernd


To be really sure, make it TRIM(LEFT(UPPER("O"))) *:-)

Lars-Åke


Takk, Lars!

:-)

Regards,
Bernd
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count the words in a cell

To be really sure, make it TRIM(LEFT(UPPER("O")))

To be really super-duper extra sure you might want to use:

CLEAN(TRIM(PROPER(LEFT(UPPER(CHAR(79)),1))))

--
Biff
Microsoft Excel MVP


"Lars-Åke Aspelin" wrote in message
...
On Thu, 20 May 2010 11:24:51 -0700 (PDT), Bernd P
wrote:

On 20 Mai, 18:30, "T. Valko" wrote:
Try this...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER("O"),""))

Note that SUBSTITUTE is case sensitive.

--
Biff
Microsoft Excel MVP

"Elton Law" wrote in message

...

Dear exper
A cell contains a lot of information.
Is it possible to count certan word in a cell please?

Say A1 contains a series of text ....

1. Daily Swing even though Sto is hit high or low
2. Look at Chart pattern
3. Stop at dangerous level

How can I count number of "O" in the cell A1 please?

Thanks
Elton


Hi Biff,

I like that UPPER("O") part :-)

Have fun,
Bernd


To be really sure, make it TRIM(LEFT(UPPER("O"))) :-)

Lars-Åke



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
Count the number of a range of words in a cell Prashanth KR Excel Worksheet Functions 9 March 4th 08 10:44 AM
Count Number or words in Cell [email protected] Excel Discussion (Misc queries) 7 August 15th 07 04:14 PM
How do I count the number of words in a cell? Phil Excel Worksheet Functions 3 May 2nd 06 07:13 PM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM
Count the number of words in a cell! Doom3 Excel Worksheet Functions 4 November 23rd 04 06:00 AM


All times are GMT +1. The time now is 03:18 PM.

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"