TypeError: Cannot read property ‘getRange’ of null (line 6, file “Code”) in google sheet script [duplicate]

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.

Leave a Comment