Here is the solution I've used on my problem, which might not be the best since I am not really familiar with Google script.
In order to get the desired result, use this formula on the sheet you want the split result to be stored: =result(Import!A2:AD)
. Import is the sheet connected to the Google form.
function result(range) {
var output2 = [];
for(var i=0, iLen=range.length; i<iLen; i++) {
var q = range[i][5].split(",");
var r = range[i][6].split(",");
var t = range[i][7].split(",");
var u = range[i][8].split(",");
var s = range[i][12].split(",");
var v = range[i][15].split(",");
var w = range[i][18].split(",");
var x = range[i][21].split(",");
var y = range[i][24].split(",");
for(var j=0, jLen=v.length; j<jLen; j++) {
var output1 = [];
for(var k=0, kLen=range[0].length; k<kLen; k++) {
if(k == 5)
{
output1.push(q[j]);
}
else if(k==12)
{
output1.push(s[j]);
}
else if(k==6)
{
output1.push(r[j]);
}
else if(k==7)
{
output1.push(t[j]);
}
else if(k==8)
{
output1.push(u[j]);
}
else if(k==15)
{
output1.push(v[j]);
}
else if(k==18)
{
output1.push(w[j]);
}
else if(k==21)
{
output1.push(x[j]);
}
else if(k==24){
output1.push(y[j]);
}
else
{
output1.push(range[i][k]);
}
}
output2.push(output1);
}
}
return output2;
}
k represents the column of the sheet.