Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get a word count in Excel XP
Chip,
This is very cool! Is there a way to set this up for "active cell" only? I am doing an Request for Proposal response with a 100 word per answer limit. I suspect our customer is using Excel to align question responses in columns form multiple vendors. I want to make sure none of my responses exceed the limit but would rather not count by hand or cut and paste each question (78) into word. Thanks in advance. Paul "Chip Pearson" wrote: Excel doesn't have a built-in word counter. You'd have to loop through each cell, determine how many words in each cell, and sum these. For example, Sub AAA() Dim WordCount As Long Dim Rng As Range Dim S As String Dim N As Long For Each Rng In ActiveSheet.UsedRange.Cells S = Rng.Text N = 0 If S < "" Then N = Len(S) - Len(Replace(S, " ", "")) + 1 End If WordCount = WordCount + N Next Rng MsgBox WordCount End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Nadine" wrote in message ... I am translating and need a word count. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get a word count in Excel XP
You could use a worksheet formula in a cell right next to your input cell to see
the results for that cell: Something like: =IF(A1="",0,LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1) ==== But you could change one line in Chip's routine to work against the activecell: For Each Rng In ActiveSheet.UsedRange.Cells becomes For Each Rng In ActiveCell.Cells PGiessler wrote: Chip, This is very cool! Is there a way to set this up for "active cell" only? I am doing an Request for Proposal response with a 100 word per answer limit. I suspect our customer is using Excel to align question responses in columns form multiple vendors. I want to make sure none of my responses exceed the limit but would rather not count by hand or cut and paste each question (78) into word. Thanks in advance. Paul "Chip Pearson" wrote: Excel doesn't have a built-in word counter. You'd have to loop through each cell, determine how many words in each cell, and sum these. For example, Sub AAA() Dim WordCount As Long Dim Rng As Range Dim S As String Dim N As Long For Each Rng In ActiveSheet.UsedRange.Cells S = Rng.Text N = 0 If S < "" Then N = Len(S) - Len(Replace(S, " ", "")) + 1 End If WordCount = WordCount + N Next Rng MsgBox WordCount End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Nadine" wrote in message ... I am translating and need a word count. -- Dave Peterson |
#3
|
|||
|
|||
Here is a free tool to count words in Excel files:
http://www.montereylanguages.com/exc...free-tool.html It counts the number of words in Excel files, also gives the option to exclude numbers (like years or dollar amounts) from the word count. |
#4
|
|||
|
|||
Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel | |||
Pasting Word table cell with paragraph markers into single Excel c | Excel Discussion (Misc queries) | |||
Can Excel Export Data to Word Format? | Excel Discussion (Misc queries) | |||
Entering Excel information into MS Word | Excel Discussion (Misc queries) |