VLookup on Javascript #3

    0

    3

    Guntar Susatyo

    This code will look for the row of code that has the value of KodePOD in column G1.

    Shortcut: sheetVLookUp_03

    function findRowOfKodePO() {
      var sheetJadwalPO = SpreadsheetApp.openById('1pEGVc2q32yRCYhPxcl_xHwBfoI_ApgizkpX_4ngorzg').getSheetByName('Jadwal');
      var dataDicari = sheetJadwalPO.getDataRange().getValues();
      var dataKodePOD = sheetIsian.getRange("G1").getValue();
    
      for(var i = 0; i < dataDicari.length;i++){
        if(dataDicari[i][1] === dataKodePOD){ //[1] because column B
          // Logger.log((i+1) + ' ketemu!')
          return i+1;
        }
      }
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.