excel - Search array of thing and spit it out in different column -


is there way break math calculation in different column str1+str2 /str3-str4*str5-str6 columns str1 , str2 , str3 str4 , str5 , str6. there no particular order , may occur multiple time.

this may need:

sub splitonsigns() dim x long, mystring string, mysign variant, myarr variant mysign = array("+", "-", "*", "/") mystring = activecell.text x = lbound(mysign) ubound(mysign)     mystring = replace(mystring, mysign(x), "|") next myarr = split(mystring, "|") range(activecell.offset(0, 1).address & ":" & activecell.offset(0, ubound(myarr) + 1).address) = myarr end sub 

you can add more entries here:

mysign = array("+", "-", "*", "/") 

if there more signs split on. assumes data doesn't have pipes in "|" can change split char unused 1 if needed.

it works progressivly replacing signs pipe, splits string array using pipe split, posts array range next active cell


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -