View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
jackal2k6[_2_] jackal2k6[_2_] is offline
external usenet poster
 
Posts: 1
Default WORD-DELIMITED string vba macro for excel/word


Hi Toppers, it works perfectly with the myText value you assigned to it
- how would it need to be modified if I want to do the split for a
single long string that's already in a cell, say A1?

would the conversion be
Code:
--------------------
myText = Cells (1,1)?
--------------------


Thanks!


Sub SplitTextX()
Dim v As Variant
Mytext = "FULL NAME: XXXXXX SURNAME: XX FIRST NAME: XXXX FUNCTION: XXX
FULL" & _
"NAME:XX SURNAME:X FIRST :X FUNCTION:X FULL NAME:XXX SURNAME:XX" & _
"FIRST NAME:X FUNCTION:X FULL NAME: 12345 SURNAME: 45 FIRST NAME: 123
FUNCTION: 6789"
v = Split(Mytext, "FULL NAME:")
For i = 1 To UBound(v)
Cells(i, 1) = "FULL NAME:" & v(i)
Next i
End Sub


--
jackal2k6
------------------------------------------------------------------------
jackal2k6's Profile: http://www.excelforum.com/member.php...o&userid=29872
View this thread: http://www.excelforum.com/showthread...hreadid=495746