how to remove a space after a string?

  • Thread starter Thread starter elaine
  • Start date Start date
E

elaine

Hello,

Does anyone know how to remove a space after a string?

does excel read 'space' a string?

ie:

1.holiday inn(no space)
2.holiday inn(space)
3.holiday inn heathrow(space)

is it possible to keep the space been holiday and inn, but remove the
space at the end?
keeping the space between holiday and inn, inn and heathrow but remove
the last space?

and do nothing if theres nospace at the end of 1st holiday inn?

thanks.

Elaine.
 
Hi Elaine,

In VBA,

sStr = RTrim("holiday inn heathrow ")

See also LTrim and Trim in VBA help


In Excel, try the Trim worksheet function.
 

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