Created
May 7, 2020 08:56
-
-
Save JustinByrne/4d45c84b1eefba94d6fe480507456dbf to your computer and use it in GitHub Desktop.
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
// get queue number | |
function getQueueNum() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var range = sheet.getRange(1,getColByName('status'),sheet.getLastRow()); | |
var values = range.getValues(); | |
var queue = 1; | |
var statuses = ['Pending','pending','In Progress','in progress','In progress','in Progress']; | |
for (var row in values) { | |
for (var col in values[row]) { | |
if (statuses.includes(values[row][col])) { | |
queue++; | |
} | |
} | |
} | |
Logger.log(queue.toFixed()); | |
return queue.toFixed(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment