Skip to content

Instantly share code, notes, and snippets.

@8q
Created May 17, 2018 06:43
Show Gist options
  • Save 8q/79e85f9b8b1ea7b9040ea9478d8736f2 to your computer and use it in GitHub Desktop.
Save 8q/79e85f9b8b1ea7b9040ea9478d8736f2 to your computer and use it in GitHub Desktop.
トリガーで値の変更に設定しておく
function onChange(){
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('シート1');
var endRow = 0;
for(var i = 1; i <= ss.getLastRow(); i++) {
if(ss.getRange(i, 2).getValue() == "") break;
endRow++;
}
ss.getRange(endRow, 3).setValue(ss.getRange(endRow, 2).getValue())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment