Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Stripping Spaces from Right Hand Side

Hi

I have tables of data from a financial system where the non-numeric raw data
is filled with spaces when supplied to me. I am using a loop to test each
cell for these "filler spaces" on the right hand end of each cell and then
applying RTRIM to get the valid text.

Is there a shortcut alternative to using the looping - it seems quite slow

Thanks

Tim

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Stripping Spaces from Right Hand Side

1. Can your SQL handle that right-trim? Might be faster.
2. Do a right trim without testing first.
3. Put the whole range in an array and do the right-trimming on the array
elements then put back in the range.
4. Use RTrim$ instead of RTrim as it is up to twice as fast.

RBS


"Tim Childs" wrote in message
...
Hi

I have tables of data from a financial system where the non-numeric raw
data is filled with spaces when supplied to me. I am using a loop to test
each cell for these "filler spaces" on the right hand end of each cell and
then applying RTRIM to get the valid text.

Is there a shortcut alternative to using the looping - it seems quite slow

Thanks

Tim


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Stripping Spaces from Right Hand Side

Hi

Many thanks for those suggestions

Out of interest, can you say why in "4." RTrim$ is so much quicker?

Best wishes

Tim

"RB Smissaert" wrote in message
...
1. Can your SQL handle that right-trim? Might be faster.
2. Do a right trim without testing first.
3. Put the whole range in an array and do the right-trimming on the array
elements then put back in the range.
4. Use RTrim$ instead of RTrim as it is up to twice as fast.

RBS


"Tim Childs" wrote in message
...
Hi

I have tables of data from a financial system where the non-numeric raw
data is filled with spaces when supplied to me. I am using a loop to test
each cell for these "filler spaces" on the right hand end of each cell
and then applying RTRIM to get the valid text.

Is there a shortcut alternative to using the looping - it seems quite
slow

Thanks

Tim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Stripping Spaces from Right Hand Side

Look at this:
http://www.aivosto.com/vbtips/stringopt.html

RBS


"Tim Childs" wrote in message
...
Hi

Many thanks for those suggestions

Out of interest, can you say why in "4." RTrim$ is so much quicker?

Best wishes

Tim

"RB Smissaert" wrote in message
...
1. Can your SQL handle that right-trim? Might be faster.
2. Do a right trim without testing first.
3. Put the whole range in an array and do the right-trimming on the array
elements then put back in the range.
4. Use RTrim$ instead of RTrim as it is up to twice as fast.

RBS


"Tim Childs" wrote in message
...
Hi

I have tables of data from a financial system where the non-numeric raw
data is filled with spaces when supplied to me. I am using a loop to
test each cell for these "filler spaces" on the right hand end of each
cell and then applying RTRIM to get the valid text.

Is there a shortcut alternative to using the looping - it seems quite
slow

Thanks

Tim




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
how to return data from a right hand side/and one cell down JMALTO Excel Worksheet Functions 4 September 17th 09 07:06 PM
Stripping spaces using a formula, not VBA Morris[_2_] Excel Programming 3 September 26th 06 01:56 PM
Stripping out imbedded spaces in a cell/row Tom Excel Worksheet Functions 8 April 22nd 05 03:49 PM
y-axis moves from the left hand side to the right hand side JP Excel Discussion (Misc queries) 1 March 13th 05 04:43 PM
y-axis moves from the left hand side to the right hand side! JP Charts and Charting in Excel 1 March 11th 05 12:29 AM


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