I have been using this App Script to apply Conditional Formatting on single sheet.
I would like to apply this conditional formatting to multiple sheets. I am striving hard to find a way like this below line where i would add sheet name and conditional formatting will start working on those sheets which have been added in the code.
Your help will be greatly appreciated.
something like this
["Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6", "Sheet7"]; function formatting() { const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Dec'); const range = sheet.getRange("C1:AG"+sheet.getLastRow()); const values = range.getValues(); const bcolors = range.getBackgrounds(); const new_bcolors = values.map((r,i)=>r.map((c,j)=>c=='L'?'#ea9999':bcolors[i][j])) range.setBackgrounds(new_bcolors) }
onEdittrigger?