I'm trying to write a code to clear certain data cells ("F2:M95") on a time-based trigger once a week. Everything works as I want it to except I noticed it's clearing the data from those particular cells on every sheet in my workbook.
This is the function I currently have:
function LunchEmailClear() {
var app = SpreadsheetApp;
var activeSheet = app.getActive()
activeSheet.getRange("F2:M95").clear();
}
What can I add so that it will only apply to certain sheets? (i.e. "Morning Emails, Lunch Emails")
PS. Also sorry if I sound a bit dumbfounded, I just started messing around with scripts last week and hardly have any clue as to what I'm doing. I appreciate any help I can get! :)