I have a script that I want to run onOpen when only certain sheets are open, but not others in the spreadsheet to which the script is bound. The sheets that are needed all have names "Agent report - 'NameOfAgent'". Each agent report also has certain cells inside that can be used for the IF condition statement. Logically, I want to have this:
IF name of active sheet contains "Agent report" -> run script ELSE do nothing
Alternatively, IF in active sheet cell A2=="Role" -> run script ELSE do nothing
Thank you for any help.
onOpen
be always the first sheet? Also show what you've tried so far – TheMaster