Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default trim

Hi, I have a string
<cardcounter4,4,6,3,10,12,6,10,9,7,6,5,7</cardcounter and Im trying
to seperate the numbers and put them into there own cells. So far Ive
played with:
point2 = Replace(ActiveCell, "<cardcounter", "")
point2 = Replace(point2, "</cardcounter", "")
point2 = Replace(point2, " ", "")
point2 = Trim(point2)
split1 = Split(point2, ",")
point1 = Trim(split1(0))
point1 = split1(1)
point1 = split1(2)
point1 = split1(3)
point1 = split1(4)
Overall this works well. One problem Im having is when i get to the
'point1 = Trim(split1(0))' i have " 4". The first number but with a
leading space. Originally I used ' point1 = split1(0)' then I noticed
the space so I changed it to trim. But trim isnt getting rid of the
space. I thought 'point2 = Replace(point2, " ", "")', would have got
rid of the space. But i think thats only internal spaces. Any ideas how
to trim this appreciated.
Regards Robert

 
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
trim Chey Excel Discussion (Misc queries) 4 July 16th 07 07:58 PM
Trim help please Dave New Users to Excel 8 September 1st 05 07:18 PM
VBA Trim and Application.worksheetfunction.Trim Hari Prasadh Excel Programming 3 January 19th 05 02:22 PM
Trim or Len help (I think) Elaine[_5_] Excel Programming 5 July 3rd 04 11:02 PM
Trim like worksheet Trim Bob Phillips[_5_] Excel Programming 0 August 20th 03 07:10 PM


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

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

About Us

"It's about Microsoft Excel"