2013-04-03 127 views

回答

0

功能onEdit(){ 變種S = SpreadsheetApp.getActiveSpreadsheet()getSheetByName( '工作表Sheet'), 值= s.getRange。( 'A3:B')。的GetValues(), X,rowColors = [ ],顏色,顏色= [],numCols = 3;

爲(VAR行= 0,LEN = values.length;行< LEN;行++){ 如果(值[行] [0] === '熱導線' & &值[行] [1] ==='large opp')color ='Red'; else color ='White'; (x = 0; x < numCols; x ++)rowColors.push(color); colors.push(rowColors); rowColors = []; ('A3')。offset(0,0,colors.length,numCols).setBackgroundColors(colors); }

相關問題