I have the following which works great for finding a header value:
var lastCN = formResponsesSht.getLastColumn();
var data = formResponsesSht.getRange(1,1,1,lastCN).getValues();//Get 2D array of all values in row one
var data = data[0];//Get the first and only inner array
var statusCN = data.indexOf('Status') + 1;
Now I would like to find a value on a specific column. In this case B.
var lastRN = formResponsesSht.getLastRow();
var data = formResponsesSht.getRange(1,2,lastRN,1).getValues();//Get 2D array of all values in row one
var data = data[0];//Get the first and only inner array
var statusCN = data.indexOf('Status') + 1;
Why does this not work and is it possible to use the same strategy of indexOf?
