Created
March 13, 2019 13:55
-
-
Save franklinokech/af9ef9f2cea2366c9a0c130d334feaf9 to your computer and use it in GitHub Desktop.
A google app script to CLEAR values in a row NB: Dont delete the row
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 deleteRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var values = sheet.getDataRange().getValues(); | |
values.forEach(function(v, i) { | |
// get row index | |
var row = i+1; | |
// look for required values in cells | |
if (v[14] == '' && v[6] == 'PREBOOKED') { | |
// might have to modify this line based on Sheets API | |
sheet.getRange('D'+row+':P'+row).clearContent(); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment