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 to search both entire rows and columns within a range that contains a specific string and return its cell position once it finds it?