First of all I'm completly new to Google Sheets and Scripts so I'm trying to learn all by myself, so sorry if I'm asking something 'stupid'
So my problem is: I've created a Script to basically add a Background color to a cell, based in a certain condition. What I wanted to do now was identify all cells with that added Background color, select the entire row in which they are contained and copy all the information to another sheet.
I was trying to do it with an if condition, but I have no idea how to select the entire row or if the condition I'm using to get the Background color is right. Can anybody help me? Thank you so much!
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheetByName('Sheet1');
var r = s.getRange('F:F');
var v = r.getBackgrounds();
for(var i=v.length-1;i>=0;i--)
if(v =='B7E1CD')
s.getCurrentCell.copyTo(spreadsheet.getRange(20,1)); //don't mind this instruction, I know it isn't right
spreadsheet
. Is it a sheet of the same spreadsheet file or of a different spreadsheet file? – soMario