Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Word has a built-in word-count macro. Does excel?
A friend needs to find the total of all the words in an excel document. Thanks, Jack Crane |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Nope.
Jack Crane wrote: Word has a built-in word-count macro. Does excel? A friend needs to find the total of all the words in an excel document. Thanks, Jack Crane -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Jack,
See Chip's macro for one worksheet, it is looking at text, which is what you see not formulas and not values. .. http://www.cpearson.com/excel/WordCount.htm -- --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
FWIW:
Found this in Google: Paste into Standard Module Sub AAA() Dim WordCount As Long Dim cell As Range Dim S As String Dim N As Long For Each cell In ActiveSheet.UsedRange.Cells S = cell.Text N = 0 If S < "" Then N = 1 End If WordCount = WordCount + N Next cell MsgBox WordCount End Sub Hope this helps; "Jack Crane" wrote in message 6... Word has a built-in word-count macro. Does excel? A friend needs to find the total of all the words in an excel document. Thanks, Jack Crane |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Jim,
Looks like an adaptation of Chip's macro attempting to count the number of cells that are not empty. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That will count only the number of cells which contain text. It
doesn't take into account that a cell may contain more than one word. For a real word counter, see http://www.cpearson.com/excel/wordcount.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim May" wrote in message news:07JQf.238819$oG.65444@dukeread02... FWIW: Found this in Google: Paste into Standard Module Sub AAA() Dim WordCount As Long Dim cell As Range Dim S As String Dim N As Long For Each cell In ActiveSheet.UsedRange.Cells S = cell.Text N = 0 If S < "" Then N = 1 End If WordCount = WordCount + N Next cell MsgBox WordCount End Sub Hope this helps; "Jack Crane" wrote in message 6... Word has a built-in word-count macro. Does excel? A friend needs to find the total of all the words in an excel document. Thanks, Jack Crane |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yeah you're right guys,
I got in a hurry, particularly after I tried Chip's original code and with six words spread over only 4 cells, the count came back 14; ??? My attempt to help went "down-hill" from there. Sorry OP.. Tks, "Chip Pearson" wrote in message ... That will count only the number of cells which contain text. It doesn't take into account that a cell may contain more than one word. For a real word counter, see http://www.cpearson.com/excel/wordcount.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Jim May" wrote in message news:07JQf.238819$oG.65444@dukeread02... FWIW: Found this in Google: Paste into Standard Module Sub AAA() Dim WordCount As Long Dim cell As Range Dim S As String Dim N As Long For Each cell In ActiveSheet.UsedRange.Cells S = cell.Text N = 0 If S < "" Then N = 1 End If WordCount = WordCount + N Next cell MsgBox WordCount End Sub Hope this helps; "Jack Crane" wrote in message 6... Word has a built-in word-count macro. Does excel? A friend needs to find the total of all the words in an excel document. Thanks, Jack Crane |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I get a word count in Excel XP | Excel Discussion (Misc queries) | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
Macro - Open Word with Excel macro | Excel Discussion (Misc queries) |