Last active
February 11, 2017 03:00
-
-
Save kobakou/76689892b681dc7a99cb9e4567749bdd to your computer and use it in GitHub Desktop.
縦列毎に最終更新日を挿入する Google Apps Script(GAS) for GoogleSpreadSheet. 2,7,19はシートの構造依存の数値
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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