I have a for loop that builds an array of data of size n rows by 10 columns.
var dupRows = crossoverDuplicates.getDataRange(); var dupNumRows = dupRows.getNumRows(); var dupValues = dupRows.getValues(); var retreiveNotFound = []; for (var c = 1; c < dupNumRows; c++) { var dupRow = dupValues[c]; if (dupRow[10] == "") { retreiveNotFound.push(dupValues[c]); } } I then use setValues() to paste the array to the bottom of another sheet.
if (retreiveNotFound && retreiveNotFound.length) { crossover.getRange(lastRowCrossoverData + 1, 2, retreiveNotFound.length,10 ).setValues(retreiveNotFound); } However, the columns on the destination sheet have now moved and I need to paste the first 7 columns of the array in B - H and the last 3 in AV - AX.
Alternatively, I could create two arrays, one with the first 7 columns and another with the last 3 and then paste the separately.
Unfortunately, I can't figure out how to do either.
I'm guessing this has a relatively simple solution, but I'm just not searching for the right key words. Thanks in advance for your help!