Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PGiessler
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Junior Member
 
Posts: 3
Default

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   Report Post  
Banned
 
Posts: 2
Default

Quote:
Originally Posted by listings View Post
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.
THANKS! VERY USEFUL INDEED
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 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Pasting Word table cell with paragraph markers into single Excel c Steve Excel Discussion (Misc queries) 1 June 16th 05 11:26 PM
Can Excel Export Data to Word Format? Reddiance Excel Discussion (Misc queries) 2 April 18th 05 06:03 PM
Entering Excel information into MS Word dwalsh77 Excel Discussion (Misc queries) 0 April 8th 05 05:29 PM


All times are GMT +1. The time now is 06:02 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"