Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programming to delet padded spaces


I have a list of names copied from another program. This field in th
other program is padded to 30 spaces. When you copy and past it int
excel the full field is transfered, including the spaces on the end o
the name that are blank. I'd like to write a function that would ge
rid of the extra spaces for aesthetics. Does anyone have an
suggestions

--
alitc
-----------------------------------------------------------------------
alitch's Profile: http://www.excelforum.com/member.php...fo&userid=2453
View this thread: http://www.excelforum.com/showthread.php?threadid=38127

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Programming to delet padded spaces

Hi

See this page
http://www.mvps.org/dmcritchie/excel/join.htm#trimall

Look here for a formula way
http://www.rondebruin.nl/clean.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"alitch" wrote in message
...

I have a list of names copied from another program. This field in the
other program is padded to 30 spaces. When you copy and past it into
excel the full field is transfered, including the spaces on the end of
the name that are blank. I'd like to write a function that would get
rid of the extra spaces for aesthetics. Does anyone have any
suggestions?


--
alitch
------------------------------------------------------------------------
alitch's Profile: http://www.excelforum.com/member.php...o&userid=24535
View this thread: http://www.excelforum.com/showthread...hreadid=381270



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Programming to delet padded spaces

for each cell in selection
cell.Value = Application.Trim(cell.Value)
Next

--
Regards,
Tom Ogilvy


"alitch" wrote in
message ...

I have a list of names copied from another program. This field in the
other program is padded to 30 spaces. When you copy and past it into
excel the full field is transfered, including the spaces on the end of
the name that are blank. I'd like to write a function that would get
rid of the extra spaces for aesthetics. Does anyone have any
suggestions?


--
alitch
------------------------------------------------------------------------
alitch's Profile:

http://www.excelforum.com/member.php...o&userid=24535
View this thread: http://www.excelforum.com/showthread...hreadid=381270



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Programming to delet padded spaces

The TRIM function is available in both the worksheet and VBA. It trims both
leading and trailing spaces.
--
Gary's Student


"alitch" wrote:


I have a list of names copied from another program. This field in the
other program is padded to 30 spaces. When you copy and past it into
excel the full field is transfered, including the spaces on the end of
the name that are blank. I'd like to write a function that would get
rid of the extra spaces for aesthetics. Does anyone have any
suggestions?


--
alitch
------------------------------------------------------------------------
alitch's Profile: http://www.excelforum.com/member.php...o&userid=24535
View this thread: http://www.excelforum.com/showthread...hreadid=381270


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programming to delet padded spaces


Excellent

Thanks Tom.....

alitch


--
alitch
------------------------------------------------------------------------
alitch's Profile: http://www.excelforum.com/member.php...o&userid=24535
View this thread: http://www.excelforum.com/showthread...hreadid=381270

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
Getting month padded zero kickyr Excel Discussion (Misc queries) 3 February 20th 06 03:01 PM
Delet row if bold jeffbert Excel Programming 4 February 14th 05 05:46 PM
padded leading 0 tango Excel Programming 1 November 12th 04 12:22 AM
sorry i put wrongly for padded leading 0 tango Excel Programming 1 November 12th 04 12:22 AM
Once criteria has been met, delet the same row. Les Stout Excel Programming 7 November 4th 03 08:07 PM


All times are GMT +1. The time now is 01:16 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"