I need to do the following to optimize this sheet:

1. split each multi-line cell in column B so each email address will appear on a new row inserted under the original row.
2. Copy the data from cells in column A on the original row
3. I tried split+transpose formulas and a script I found here, but that is returning an error.

Here is the script:

```
function split_rows2(anArray) {
  var res = anArray.reduce(function(ar, e) {
    var splitted = e.slice(3, 12).map(function(f) {return f.toString().split(",").map(function(g) {return g.trim()})});
    var temp = [];
    for (var j = 0; j < splitted[0].length; j++) {
      temp.push(e.slice(0, 3).concat(splitted.map(function(f) {return f[j] ? (isNaN(f[j]) ? f[j] : Number(f[j])) : ""})).concat(e.slice(12, 20)));
    }   
    Array.prototype.push.apply(ar, temp);
    return ar;
  }, []);
  return res;
}

```