ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Counting Characters in Cell (https://www.excelbanter.com/excel-programming/337090-vba-counting-characters-cell.html)

ajocius[_24_]

VBA - Counting Characters in Cell
 

Group,
How can I count the number of characters that appear in a cell?
The characters are in text. The only characters appearing are 0-9, A,
B, C, D, E, F and $. I need to know how many characters appear in a
cell give a Row, Column. Actually it doesn't matter what characters
reside in the cell, the number of characters is the important thing I'm
looking for.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=395220


Vasant Nanavati

VBA - Counting Characters in Cell
 
For example:

Len(Range("A1"))

--

Vasant



"ajocius" wrote in
message ...

Group,
How can I count the number of characters that appear in a cell?
The characters are in text. The only characters appearing are 0-9, A,
B, C, D, E, F and $. I need to know how many characters appear in a
cell give a Row, Column. Actually it doesn't matter what characters
reside in the cell, the number of characters is the important thing I'm
looking for.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile:
http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=395220




Rowan[_2_]

VBA - Counting Characters in Cell
 
len(cells(1,1).text)
or len(cells(1,1).value)

Hope this helps
Rowan

"ajocius" wrote:


Group,
How can I count the number of characters that appear in a cell?
The characters are in text. The only characters appearing are 0-9, A,
B, C, D, E, F and $. I need to know how many characters appear in a
cell give a Row, Column. Actually it doesn't matter what characters
reside in the cell, the number of characters is the important thing I'm
looking for.

Tony


--
ajocius
------------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695
View this thread: http://www.excelforum.com/showthread...hreadid=395220



ajocius[_25_]

VBA - Counting Characters in Cell
 

Thanx for the replies, they work perfectly.

Ton

--
ajociu
-----------------------------------------------------------------------
ajocius's Profile: http://www.excelforum.com/member.php...fo&userid=1769
View this thread: http://www.excelforum.com/showthread.php?threadid=39522



All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com