Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Getting month padded zero | Excel Discussion (Misc queries) | |||
Delet row if bold | Excel Programming | |||
padded leading 0 | Excel Programming | |||
sorry i put wrongly for padded leading 0 | Excel Programming | |||
Once criteria has been met, delet the same row. | Excel Programming |