ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   EXCEL: wordcount within cell (https://www.excelbanter.com/excel-worksheet-functions/198705-excel-wordcount-within-cell.html)

CPAZO

EXCEL: wordcount within cell
 
How do i set up wordcount within cell?

Mike H

EXCEL: wordcount within cell
 
Try

=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1

Mike

"CPAZO" wrote:

How do i set up wordcount within cell?


Teethless mama

EXCEL: wordcount within cell
 
=LEN(A1)


"CPAZO" wrote:

How do i set up wordcount within cell?


Dave Peterson

EXCEL: wordcount within cell
 
If the words are separated by spaces:
=LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+(TRIM(A1)<"")



CPAZO wrote:

How do i set up wordcount within cell?


--

Dave Peterson

John C[_2_]

EXCEL: wordcount within cell
 
And if I have 2 words in the cell?

Borrowing from Mike's solutions:
=IF(A1="",0,LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1)

--
John C


"Teethless mama" wrote:

=LEN(A1)


"CPAZO" wrote:

How do i set up wordcount within cell?



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

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