Mobile menu

How to count characters on multiline cells on Ms Excel?
Thread poster: Elizabeth Sánchez León

Elizabeth Sánchez León  Identity Verified
Spain
Local time: 18:22
English to Spanish
+ ...
Sep 4, 2008

I have been searching for this topic and I have not found much information.

I have an .xsl file with cells having severals lines on each one. Each cell has a different character limitation, both in the no. of accepted lines and in the no. of accepted characters per line. Does anyone know an efficient way to count both the lines and the characters per line of each cell? I know how to use the LENGTH function of Ms Excel, but I think here I need something more sophisticated.

Many thanks for your help!


Direct link Reply with quote
 

Antoní­n Otáhal
Local time: 19:22
Member (2005)
English to Czech
+ ...
Some programming is needed Sep 4, 2008

The InStrRev function of Visual Basic will come handy (looking up the positions of manual line break "control character" within cell strings):

Description

Returns the position of an occurrence of one string within another, from the end of string.

Syntax

InstrRev(stringcheck, stringmatch[, start[, compare]])


You will find more info in Visual Basic help.

If I were programming it, I would probably export to Word, or txt or xml, before working further with it - but most likely it can be done even in Excel itself. It mostly depends on your personal taste.

HTH

Antonin

[Edited at 2008-09-04 19:29]


Direct link Reply with quote
 
raptisi  Identity Verified
Spain
Local time: 20:22
English to Greek
+ ...
Cut&Paste Sep 5, 2008

I am not sure if that is exactly what you are asking, but you could copy the Excel content into a Word document and then do the word count there.
Just a suggestion!

[Editado a las 2008-09-05 10:20]


Direct link Reply with quote
 
Ryan Ginstrom
Local time: 02:22
Japanese to English
Using VBA to get the number of lines in an Excel cell Sep 5, 2008

Does anyone know an efficient way to count both the lines and the characters per line of each cell? I know how to use the LENGTH function of Ms Excel, but I think here I need something more sophisticated.


To get the number of lines, you could split the cell's text on the newline character (10).

Lines = Split(Application.ActiveCell.Text, Chr(10))
' array is zero based, so length will be ubound + 1
Debug.Print Str(UBound(Lines) + 1) + " lines"

length will get you the number of characters.

HTH!

[Edited at 2008-09-06 04:22]


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to count characters on multiline cells on Ms Excel?

Advanced search






SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »
Across v6.3
Translation Toolkit and Sales Potential under One Roof

Apart from features that enable you to translate more efficiently, the new Across Translator Edition v6.3 comprises your crossMarket membership. The new online network for Across users assists you in exploring new sales potential and generating revenue.

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs