function get2cols (rng,x,y){ // Returns two particular columns of a two dimensional array or range var rtn = []; rng.forEach((item) => { rtn.push([item[x],item[y]]); }); return rtn; }