macros - Map comma seperated values in two columns in Excel -
i have excel 2 columns. cola , colb.
there comma seperated values in each of columns. need each of values in cola mapped each of value in colb.
sample data:
cola colb a,b,c 4,5 e,f 6,8,3
expected output
a 4 5 b 4 b 5 c 4 c 5 e 6 e 8 e 3 f 6 f 8 f 3
can macro?
have play arrays, don't know data should end have play around, should started.
dim strtest string, strarray() string dim strtest2 string, strarray2() string dim intcount integer, intcount2 integer dim colcount integer, integer colcount = cells(rows.count, "a").end(xlup).row = 1 colcount strtest = cells(i, 1).value strarray = split(strtest, ",") strtest2 = cells(i, 2).value strarray2 = split(strtest, ",") intcount = lbound(strarray) ubound(strarray) intcount2 = lbound(strarray2) ubound(strarray2) debug.print trim(strarray(intcount) & "," & strarray2(intcount2)) next next next
Comments
Post a Comment