VLookup on Javascript #1

    0

    2

    Guntar Susatyo

    VLookup variant pertama

    Shortcut: sheetVLookUp_01

    function DoLookupPO(cariIni, noPO) {
      const dataPOnya = sheetDataPO.getRange(3,74, sheetDataPO.getLastRow()-1, 77).getValues();
      const barisYgMatch = dataPOnya.find(r => r[0] === noPO)
      // cari ini = posisi kolom ke berapa dari dataPOnya
      const match = barisYgMatch ? barisYgMatch[cariIni] : null
      console.log(match);
      return match;
    }
    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.