function moveYellow() {
var ss=SpreadsheetApp.getActive();
var sh=ss.getSheetByName('Sheet1');
var csh=ss.getSheetByName('Sheet2');
var rg=sh.getRange(2,1,sh.getLastRow()-1,sh.getLastColumn());
var v=rg.getValues();
var b=rg.getBackgrounds();
var d=0;//deleted row counter
for(var i=0;i<v.length;i++) {
if(b[i][0]=='#ffff00') {
csh.appendRow(v[i]);
//sh.deleteRow(i+2-d++);
}
}
}
Копирует только столбцы A, C, E
function runOne() {
var ss=SpreadsheetApp.getActive();
var sh=ss.getSheetByName('Sheet1');
var csh=ss.getSheetByName('Sheet2');
var rg=sh.getRange(2,1,sh.getLastRow()-1,sh.getLastColumn());
var v=rg.getValues();
var b=rg.getBackgrounds();
var d=0;//deleted row counter
for(var i=0;i<v.length;i++) {
if(b[i][0]=='#ffff00') {
csh.appendRow(v[i].map(function(c,i){if(i==0 || i==2 || i==4){return c;}}).filter(function(e){return e}));
//sh.deleteRow(i+2-d++);
}
}
}