Counting Characters in a string

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

Is there an easy way to count the number of Characters in a string.

Thanks

Les
 
Just to clarify, Len("YourString") will return 9, since it's counting the
number of characters in the literal "YourString".

If you have a variable that contains the string value you want to check,
you'd use Len(nameofvariable)
 
Where, of course, you would replace 'nameofvariable' with the name of your
own variable!

TC :-)
 
Just to be sure you get what you want, recognize that the Len function also
counts spaces.

Len("MyString") = 8
Len("My String") = 9
 
Thanks
Good Point
Les
PC Datasheet said:
Just to be sure you get what you want, recognize that the Len function also
counts spaces.

Len("MyString") = 8
Len("My String") = 9

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 
Les, I think you now know all there is to know about the Len() function!

TC :-)
 

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