By using expertatexcel.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

expertatexcel.com

 


Trim - function string removed leading a trailing characters

You can also use LTrim( ) and RTrim( ) to remove Left Spaces or Right Spaces respectively.

Try the following

Immediate Window Ctrl G

s = " abcd "
? len(s)
6
? s
abcd
? trim(s)
abcd
? len(trim(s))
4