How do I count words on Excel book or sheet?

  • Thread starter Thread starter Lisa J
  • Start date Start date
L

Lisa J

I'm using Excel 07 to organize the research and writing of a book. I need a
way to measure my progress by word count. Is there a more efficient way than
to cut/paste in Word just to get the count?
 
Yes. The more efficient way is to use Word instead of Excel.

If you insist on using Excel, the common way is to count spaces. Something
like:
=len(a1)-len(substitute(a1," ",""))

Regards,
Fred.
 
Here's a simple piece of code that counts all the words on a
worksheet. It assumes that each word is separated by a single space.

Sub WordCount()
Dim R As Range
Dim Total As Long
Dim V As Variant

For Each R In ActiveSheet.UsedRange
If R.Text <> vbNullString Then
V = Split(R.Text, Chr(32))
Total = Total + UBound(V) - LBound(V) + 1
End If
Next R
MsgBox CStr(Total) & " words on all cells on sheets."
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Sun, 1 Feb 2009 08:26:00 -0800, Lisa J <Lisa
 
assumed your range A1:C10.

Array function use ctrl + shift + enter

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

source : microsoft website
 
Back
Top