Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

google app script column to array indexOf

//  Google app script column to array indexOf
var numRows = sheet.getLastRow();
var nameRng = sheet.getRange(2, 3, numRows).getValues(); // this is [[v1],[v2],...
var nameArr = String(nameRng).split(",");   // force column range into a String() and then split() it back into an array
if (nameArr.indexOf(inName) > 0 ) 
 
PREVIOUS NEXT
Tagged: #google #app #script #column #array #indexOf
ADD COMMENT
Topic
Name
5+4 =