Automatically updating google spreadsheet with modified dates

前端 未结 1 1892
别那么骄傲
别那么骄傲 2021-01-25 06:35

\'ve been trying get google spreadsheet to add data into a cell automatically when another cell is edited, however I can only seem to make the onedit function work globally.

相关标签:
1条回答
  • 2021-01-25 07:13
    function onEdit(e) {
      var s = e.source.getActiveSheet();
    
      if( s.getIndex()== 2 ) {
        var r = s.getActiveRange();
        if( r.getColumn() == 2) {
          s.getRange(r.getRow(),14).setValue(new Date());
    
        }
      }
    }  
    
    0 讨论(0)
提交回复
热议问题