I need to get a Google sheet's cell background color hex code into that same cell.
This is the function I currently use:
function BGHEX(row, column) {
var background = SpreadsheetApp.getActive().getDataRange().getCell(row, column).getBackground();
return background;
}
Now I have 2 issues:
- I need the function to run again when the cell's background color is edited. I know I need to use the installable trigger "onChange" but no idea how to set it up.
- I need this script & function to run on a duplicate of this Google Sheet file (meaning other sheet id's).
Thanks in advance for your help!