Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove non-space spaces? msnyc07 Excel Worksheet Functions 4 May 31st 10 02:06 PM
remove space BE 039 to BE039 Bobby Sullivan New Users to Excel 2 March 31st 10 07:59 PM
remove space capreecorn Excel Worksheet Functions 4 March 17th 09 03:45 PM
Remove Space in Cells [email protected] New Users to Excel 0 March 31st 08 05:36 PM
How to remove a space Kevin Excel Discussion (Misc queries) 5 July 20th 07 01:24 PM


All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"