1

I want to split an XML Code after an command i.e. ....<car>BMW3</car> There is a lot of stuff in front of this command so I would like to use the Splitfunction with "<car>" as delimiter. Is there a way to make this possible or is there another function or VBA code to make this happen?

Thanx in advance :)

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
DupsyMay
  • 11
  • 1
  • 2
    You should really use an XML Parser to parse XML, not string functions: http://stackoverflow.com/questions/4550212/parsing-xml-in-vba | http://stackoverflow.com/questions/11305/how-to-parse-xml-using-vba – Alex K. Aug 01 '14 at 14:33
  • Agree with Alex, but this works `?split( "somestuffmorestuff","")( 1)` so what's the question? – Dick Kusleika Aug 01 '14 at 14:53
  • Thanks... I was reading the documentation of "split" and always read, that there is only one character possible. But you're right. Works just fine. Will look into xml parser! – DupsyMay Aug 04 '14 at 06:52

1 Answers1

0

That should do it : Replace String with your whole text, and WordDeliminter with your delimiter.

SPLIT(SUBSTITUTE(String,WordDeliminter,";"),";")
Sifu
  • 1,082
  • 8
  • 26