Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • 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
Jun 23, 2003
4
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.
 
Replies continue below

Recommended for you

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