Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default hi, how can I do wordcount in Excel?

hi,doers anyone know how to do wordcount in Excel? I appreciate your help,
Manz thanks, Marketa
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 99
Default hi, how can I do wordcount in Excel?

Hi,

Try this code from Chip Pearson's page.

Sub CountWords()
Dim WordCount As Long
Dim Rng As Range
Dim S As String
Dim N As Long
For Each Rng In ActiveSheet.UsedRange.Cells
S = Application.WorksheetFunction.Trim(Rng.Text)
N = 0
If S < vbNullString Then
N = Len(S) - Len(Replace(S, " ", "")) + 1
End If
WordCount = WordCount + N
Next Rng
MsgBox "Words In ActiveSheet Sheet: " & Format(WordCount,"#,##0")
End Sub


Dave

"Marketa" wrote:

hi,doers anyone know how to do wordcount in Excel? I appreciate your help,
Manz thanks, Marketa

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 99
Default hi, how can I do wordcount in Excel?

Or you can use the following formula to count the words in a range:

=SUM(LEN(A1:F10))-SUM(LEN(SUBSTITUTE(A1:F10," ","")))+COUNTA(A1:F10)

entered as an array formula with Control-Shift-Enter.

Dave


"Marketa" wrote:

hi,doers anyone know how to do wordcount in Excel? I appreciate your help,
Manz thanks, Marketa

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
EXCEL: wordcount within cell CPAZO Excel Worksheet Functions 4 August 13th 08 03:40 PM


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

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

About Us

"It's about Microsoft Excel"