Skip to content

Instantly share code, notes, and snippets.

@RR-Helpdesk
Last active June 10, 2023 15:31
Show Gist options
  • Save RR-Helpdesk/f3e163fa105700b8bd244f85108b6ff3 to your computer and use it in GitHub Desktop.
Save RR-Helpdesk/f3e163fa105700b8bd244f85108b6ff3 to your computer and use it in GitHub Desktop.
Google Sheets Custom Functions #sheets #gas #functions
/**
* Returns the Hexadecimal value of a cell's background color.
*
* @param {number} row The cell's row number.
* @param {number} column The cell's column number.
* @return The Hexadecimal value of the cell's background color.
* @customfunction
*/
function BGHEX(row, column) {
var background = SpreadsheetApp.getActive().getDataRange().getCell(row, column).getBackground();
return background;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment