ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to remove a space after a string? (https://www.excelbanter.com/excel-programming/363802-how-remove-space-after-string.html)

elaine

how to remove a space after a string?
 
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.


Norman Jones

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.




Charlie

how to remove a space after a string?
 
=TRIM(" removes extra spaces at the beginning and end of a string ")

"elaine" wrote:

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.



elaine

how to remove a space after a string?
 
thank you so much!
very helpful!!!

Elaine.

Charlie wrote:
=TRIM(" removes extra spaces at the beginning and end of a string ")

"elaine" wrote:

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.





All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com