Result of JOIN is longer than the limit of 50,000 characters

前端 未结 1 848

I am trying to combine text from column A and match it with each possibility of column B.I used the formulas:

in C1:

=transpose(split(join(\"\", arr         


        
1条回答
  •  Happy的楠姐
    2021-01-14 22:25

    Go to menu Tools → Script Editor...

    Paste this code:

    function crossJoin(arr1, arr2, delim) {
    
      delim = delim || '';
    
      var result = [];
      var row = [];
      for (var i = 0; i < arr1.length; i++) {
        for (var j = 0; j < arr2.length; j++) {
          row = [];
          row.push('' + arr1[0,i] + delim + arr2[0,j]);
          result.push(row);
        }   
      }
      return result;
    }
    

    Save project.

    Use it as regular function in spreadsheet:

    =crossJoin(A1:A132,B1:B52)

    Optionaly use delimeter:

    =crossJoin(A1:A132,B1:B52, "-")

    0 讨论(0)
提交回复
热议问题