Created
August 4, 2018 13:50
-
-
Save oonisidesu/09592d826580898766e34d1c5f55e199 to your computer and use it in GitHub Desktop.
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 myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var lastRow = sheet.getLastRow(); | |
for(var i = 2; i <= lastRow; i++) { | |
if(!sheet.getRange(i, 2).getValue()){ | |
Logger.log(sheet.getRange(i, 1).getValue()); | |
sheet.getRange(i, 2).setValue(true); | |
break; | |
} | |
} | |
if(i >= lastRow) { | |
Logger.log(sheet.getRange(2, 2, lastRow - 1).getA1Notation()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment