The documentation for getSheetByName says, “Returns null if there is no sheet with the given name.” Therefore, you probably don’t have a sheet named “2020 MTD.” Create it or correct the name.
More Related Contents:
- Is there a way to evaluate a formula that is stored in a cell?
- No permission to call msgBox in Google Apps Scripting
- Apps Script: how to get hyperlink from a cell where there is no formula
- Periodically refresh IMPORTXML() spreadsheet function
- Is there a custom function or script that returns gid of a specific sheet in Google Sheets?
- Selecting the last value of a column
- Using built-in spreadsheet functions in a script
- Google Sheet use Importxml error could not fetch url [duplicate]
- How to create INDIRECT array string of multiple sheet references in Google Sheets?
- Is it possible to ‘prefill’ a google form using data from a google spreadsheet?
- Detect user inserting row or column in a google spreadsheet and reacting in a script
- How to auto select range from a filter without having to manually enter it?
- Script to Change Row Color when a cell changes text
- Sheet.getRange(1,1,1,12) what does the numbers in bracket specify?
- How to get onFormSubmit to trigger automatically?
- Copying a spreadsheet copies all linked files as well
- “SpreadsheetApp.getUi() cannot be called from this context”
- copy data from one sheet to another in google app script and append a row, one small issue
- Google App Scripts cannot be given Authorization or Permission
- How to get the correct range to set the value to a cell?
- Refresh data retrieved by a custom function in Google Sheet
- How to extract the link from a cell now that links are not reflected as HYPERLINK?
- Dynamically creating spreadsheet menu items
- Increment Cell value by one by clicking
- email notification if cell is changed
- Dynamic selection options in Google Apps Script for forms
- Determine current user in Apps Script
- .setFormula() and received error missing ) argument list
- How can I merge multiple tabs in a Google Spreadsheet using Google App Script?
- Passing cell references to spreadsheet functions