Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count the number of characters in a cell 1

Status
Not open for further replies.

dutchmen

Materials
Joined
Jun 23, 2003
Messages
4
Location
US
As part of a visual basic program I need to count the number of characters used in a cell. For example, if cell A1 in a workbook contains the text: How are you today?, the function or macro should give: function(A1) equals 15.
Thank yo in advance for your help.
 
You could use the Len() function, but the value that is returned for "How are you today?" will be 18. This is because spaces are counted as characters.

[atom] Richard Nornhold, PE
nornrich@redrose.net
 
Problem solved. Thank you for this, for me, very useful tip.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top