I'm collecting one-letter responses from users in a Google Sheet and would like their responses to be made uppercase as they are input, but only within the cells D5-J[infinity]. I found a few responses on how to do this and Frankensteined the following code in Script Editor, but it's not firing. What's wrong?
function onEdit(e) {
var column = e.range.getColumn();
var row = e.range.getRow();
if ( col >= 4 && col <= 10 ) {
if ( row >= 5 ) {
if (typeof e.value != 'object') {
e.range.setValue(e.value.toUpperCase());
}
}
}
}