Skip to content

Instantly share code, notes, and snippets.

@kobakou
Last active February 11, 2017 03:00
Show Gist options
  • Save kobakou/76689892b681dc7a99cb9e4567749bdd to your computer and use it in GitHub Desktop.
Save kobakou/76689892b681dc7a99cb9e4567749bdd to your computer and use it in GitHub Desktop.
縦列毎に最終更新日を挿入する Google Apps Script(GAS) for GoogleSpreadSheet. 2,7,19はシートの構造依存の数値
function insertLastUpdated() {
var sheet = SpreadsheetApp.getActiveSheet();
var currentCol = sheet.getActiveCell().getColumn();
if(currentCol > 2 && currentCol < 7){
sheet.getRange(19, currentCol).setValue(Utilities.formatDate(new Date(), 'JST', 'MM/dd HH:mm'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment