ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count the number of words in a cell! (https://www.excelbanter.com/excel-worksheet-functions/6928-count-number-words-cell.html)

Doom3

Count the number of words in a cell!
 
I can't figure out the way of doing it. There is a note about it on microsoft
web site You can count the number of words in a cell by using the following
formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

But it's not working. I can't even enter this formula since exell complains
every time that formula is not correct.

Any ideas?

Don Guillett

I just tested and it worked just fine,even with a mixture of text and
numbers
aaaa 1a11 bbb c 2 e2ee3

--
Don Guillett
SalesAid Software

"Doom3" wrote in message
...
I can't figure out the way of doing it. There is a note about it on

microsoft
web site You can count the number of words in a cell by using the

following
formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

But it's not working. I can't even enter this formula since exell

complains
every time that formula is not correct.

Any ideas?




Myrna Larson

I just pasted the formula from the message into a worksheet. It is
syntactically and logicall correct as written -- I got no errors, and it
returned the correct result.

On Mon, 22 Nov 2004 17:15:01 -0800, "Doom3"
wrote:

I can't figure out the way of doing it. There is a note about it on microsoft
web site You can count the number of words in a cell by using the following
formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

But it's not working. I can't even enter this formula since exell complains
every time that formula is not correct.

Any ideas?



Max

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

Copied and pasted the formula above into Excel 97
Excel 97 accepted it w/o errors, and it works ok, too ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Doom3" wrote in message
...
I can't figure out the way of doing it. There is a note about it on

microsoft
web site You can count the number of words in a cell by using the

following
formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

But it's not working. I can't even enter this formula since exell

complains
every time that formula is not correct.

Any ideas?




Arvi Laanemets

Hi

From where are you? Or more important, what are your Windows regional
settings? When there is a semicolon selected as list delimiter , then use
it instead of comma in formula!


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


"Doom3" wrote in message
...
I can't figure out the way of doing it. There is a note about it on

microsoft
web site You can count the number of words in a cell by using the

following
formula:

=IF(LEN(TRIM(A1))=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(A1," ",""))+1)

But it's not working. I can't even enter this formula since exell

complains
every time that formula is not correct.

Any ideas?





All times are GMT +1. The time now is 02:12 PM.

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