View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default how to remove a space after a string?

Hi Elaine,

In VBA,

sStr = RTrim("holiday inn heathrow ")

See also LTrim and Trim in VBA help


In Excel, try the Trim worksheet function.

---
Regards,
Norman



"elaine" wrote in message
ups.com...
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.