Home > Blockchain >  LEFT OUTER JOIN 2 sheets using 1 column via Google App Script
LEFT OUTER JOIN 2 sheets using 1 column via Google App Script

Time:04-24

How to JOIN 2 tables on 1 column together like in SQL "LEFT OUTER JOIN" for a Google Sheet in a simple way using Google App Script?

Found solutions, but does not solves my issue:

CodePudding user response:

Create a Google App Script that has embedded normal google sheet code.

  var sp = SpreadsheetApp.getActiveSheet();
  var col = [];
  for(var n=0 ; n < sp.getMaxRows(); n  ){
    var hh = n   1;
    col.push(['=VLOOKUP(A'   hh   ',sheet_to_look_up!A:C,2,false)']);
  }
  sp.getRange('L:L').setValues(col); 
  sp.getRange('L1').setValue('Column Header Name');

  • Related