Find position of a cell containing a specific string
问题 I'm looking for a way to search for a string in a range and get the position of the cell once found. Here's what I use to find the row number var ss = SpreadsheetApp.getActiveSheet(); var values = ss.getRange("B:B").getValues(); var i=rownum=0; for(i=0;i<values.length;i++) { if(values[i]=='string') rownum=i+1; I then use the following code to find the column number var colvalue; for (j=1;j<ss.getLastColumn();j++) { if (ss.getRange(3,j).getValue() == "string" { colvlaue = j; } } Is there a way