View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Passing result of multiple split function results to 1 Array

Maybe you could concatenate the 8 strings into one giant string (use the same
delimiter between strings as you use between fields).

Then split that giant string.

dim myBigString as string
dim s1 as string
dim s2 as string
'...
dim s8 as string
dim myArray as variant

myBigString = s1 & "," & s2 & "," & ... & "," & s8
myarray = split(mybigstring, ",")



ExcelMonkey wrote:

I know I can use the split function on a string to return an array.

Array = Split(var2)

I have 8 string variables that I want to apply the split function to and I
then want to send all these elements into 1 Master Array. Do I still have to
create the 8 individual arrays as a middle step or can bypass this using some
sort of aggregation in brackets like:

MasterArray =
(Split(var1),Split(var2),Split(var3),Split(var4),S plit(var5),Split(var6),Split(var7),Split(var8))

Thanks

EM


--

Dave Peterson