Last active
December 8, 2016 02:36
-
-
Save Yamotty/b3905259471d2081ac89 to your computer and use it in GitHub Desktop.
[超簡単] spreadsheetを更新したら自動で更新日付を入れるGAS ref: http://qiita.com/Yamotty/items/888ae6f93a05a8cfc16f
This file contains 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 ss = SpreadsheetApp.getActiveSheet(); | |
var currentRow = ss.getActiveCell().getRow(); | |
var currentCell = ss.getActiveCell().getValue(); | |
var updateRange = ss.getRange('F' + currentRow) //更新日をいれる列をstringで指定。この場合はF列 | |
Logger.log(updateRange); | |
//更新日の記入 | |
if(currentRow>1){ | |
if(currentCell) { | |
updateRange.setValue(new Date()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment