Character count in Excel?

  • Thread starter Thread starter Murgi
  • Start date Start date
M

Murgi

How to perform a character count in Excel?
I receive sometimes jobs where I have to translate sentences in cells while
overwriting the source text.
The Excel file also includes a number of "text boxes".
When I copy the Excel file into MS Word, normal text is copied, but the text
within the text boxes is not.

Is there a way to get a total character count directly in Excel, or is there
a trick to copy everything into MS Word for a proper count?
If this doesn't work, is there some software that will make proper counting
possible?
 
This should give you a basic count :-

'------------------------------------------------
Sub CHARACTER_COUNT()
Dim SheetCount As Long
Dim BoxCount As Long
Dim ws As Worksheet
'------------------------
Set ws = ActiveSheet
BoxCount = 0
For Each tb In ws.TextBoxes.ShapeRange
x = tb.TextFrame.Characters.Count
BoxCount = BoxCount + x
Next
'-----------------------
SheetCount = 0
For Each c In ws.UsedRange.Cells
SheetCount = SheetCount + Len(c.Value)
Next
'-----------------------
MsgBox (BoxCount + SheetCount)
End Sub
'-------------------------------------------------------------
 
BrianB > said:
This should give you a basic count :-

'------------------------------------------------
Sub CHARACTER_COUNT()
Dim SheetCount As Long
Dim BoxCount As Long
Dim ws As Worksheet



I want to count everything in one go...

The following company has a program which can count everything... exept
textboxes.
The company told me that it is now working on an integration of a textbox
count function for Excel and Powerpoint files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top