Diagnostic reference
TypeError: e.range is not a function
Why calling e.range() fails in an onEdit trigger, and the fix: e.range is already a Range, not a function.
Updated September 12, 2026
Apps Script error
TypeError: e.range is not a function
What it means
e.range is already a Range object, not a function that returns one. Apps Script event objects expose plain properties such as e.range, e.value, and e.oldValue. Calling e.range() treats the property as a method and fails as soon as the trigger fires.
Related error messages
- TypeError: e.value is not a function
- TypeError: e.parameter is not a function
Before and after
The code before and after the fix.
function onEdit(e) {
const cell = e.range();
Logger.log(cell.getA1Notation());
}function onEdit(e) {
const cell = e.range;
Logger.log(cell.getA1Notation());
}How to fix it
- Read e.range directly. The edit event supplies a Range object.
- Remove the call parentheses from e.range(). myFunction flags the call in the editor and offers a quick fix that removes them.
- Test by editing a cell in the bound spreadsheet.
Things to check
- e exists only when the trigger fires. To run onEdit by hand, pass it a test event object.
- myFunction does not install or fire triggers.
Related reading