Confederated Tribes of Warm Springs

            Make Google Sheets open at last edited cell

            Found this quick explination and was able to get it running as a script pretty easy.


             


            function onEdit(e) {

              var ss = e.source
              var sheet = ss.getActiveSheet();
              var cell = ss.getActiveCell();
              var row = cell.getRow();
              var column = cell.getColumn();
              var sheet_name = sheet.getSheetName();
              var scriptProperties = PropertiesService.getScriptProperties();  

              scriptProperties.setProperty('row',row);
              scriptProperties.setProperty('column',column);
              scriptProperties.setProperty('sheet name',sheet_name);
            }

            function onOpen(e) {

              var properties = PropertiesService.getScriptProperties();

              var ss = e.source;
              var sheet_name = properties.getProperty('sheet name');
              var sheet = ss.getSheetByName(sheet_name);
              var row = properties.getProperty('row');
              var column = properties.getProperty('column');
              var cell = sheet.getRange(row,column);

              ss.setActiveSheet(sheet);
              ss.setActiveRange(cell);  
            }  
            Updated: 07 Feb 2018 08:36 AM
            Helpful?  
            Help us to make this article better
            0 1