vba - How to Split a string using VB Macro -


i need split number 309701406 30 970 140 6. how can vb macro script. 1 please , assist.

as mentioned in comment question, can use following:

somestring = mid(stringname, start, length)

putting sub follows:

 option explicit   sub splitstringsub()        dim originalstring string        dim string1 string       dim string2 string       dim string3 string       dim string4 string        originalstring = 309701406         'mid wants string input       'because of need split numerical string not explicity required have "  " around string input line.       'should want split string of alphabetical characters "  " required.       string1 = mid(originalstring, 1, 2)       string2 = mid(originalstring, 3, 3)       string3 = mid(originalstring, 6, 3)       string4 = mid(originalstring, 9, 1)   end sub 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -