Find Cell Matching Value And Return Rownumber
Here the code function rowOfEmployee(){ var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var data = sheet.getDataRange().getValues(); var employeeName = sheet.getRange(“C2”).getValue(); for(var i = 0; i<data.length;i++){ if(data[i][1] == employeeName){ //[1] because column B Logger.log((i+1)) return i+1; } } } When you want to perform this kind of lookup it is better to retrieve data with sheet.getDataRange().getValues() because in this … Read more