R
RobcPettit
Hi, I have a string
<cardcounter>4,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
<cardcounter>4,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