The following script runs well on my Windows PC but on my phone, when I enter the date in Cell A1, it does nothing other than clear the cell. Is this a limitation of Google Sheets on a mobile or am I doing something wrong
function onEdit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sheet = ss.getActiveSheet();
var changedCell = sheet.getActiveCell().getA1Notation();
if(changedCell=="A1") {
var columns = sheet.getMaxColumns();
var theDay = new Date(sheet.getRange(1,1).getValue()).setHours(0,0,0,0);
sheet.getRange("A1").setValue("");
sheet.setActiveSelection("B1").activate;
for (var i=2;i<columns; i++) {
var workDate = new Date(sheet.getRange(3,i).getValue()).setHours(0,0,0,0);
if (theDay === workDate) {
sheet.getRange(4,i).activate();
break;
}
}
}
}