Selecting the last value of a column

前端 未结 23 1942
再見小時候
再見小時候 2020-11-28 19:15

I have a spreadsheet with some values in column G. Some cells are empty in between, and I need to get the last value from that column into another cell.

Something li

23条回答
  •  天涯浪人
    2020-11-28 19:29

    function lastRow(column){
      var sheet = SpreadsheetApp.getActiveSpreadsheet();
      var lastRow = sheet.getLastRow();
      var lastRowRange=sheet.getRange(column+startRow);
      return lastRowRange.getValue();
    }
    

    no hard coding.

提交回复
热议问题