I have a google Sheet where i want to get the background colors of the specify range (Cells) using custom formula with script.
within the Cell A1, i put the custom function: =gh(B1:D1)
In script: function gh(Cells) { var Hoja = SpreadsheetApp.getActive().getSheetByName('PROGRAMA SST'); const Colores = Hoja.getRange(Cells).getBackgrounds(); return Colores; };
however, i get error "Exception Range not found". Note: I know if i put =gh("B1:D1") the script works but i want to avoid putting the quotes.