'Convert appendrow command to only fill in part of the target row
I have this code, which does a great job of grabbing data from scattered input cells and making them into a nice, tidy row.
function submitDataOhSoMuchFaster() {
const ss = SpreadsheetApp.getActive();
const values = ss.getActiveSheet().getRange('A1:Z13').getValues();
const entry = [
{ column: 26, row: 12 }, // Z12
{ column: 3, row: 2 }, // C2
{ column: 14, row: 2 }, // N2
{ column: 3, row: 10 }, // C10
{ column: 6, row: 2 }, // F2
{ column: 3, row: 4 }, // C4
{ column: 5, row: 4 }, // E4
{ column: 3, row: 5 }, // C5
{ column: 5, row: 5 }, // E5
{ column: 12, row: 5 }, // L5
{ column: 12, row: 4 }, // L4
{ column: 26, row: 13 }, // Z13
{ column: 20, row: 4 }, // T4
{ column: 20, row: 5 }, // T5
{ column: 3, row: 6 }, // C6
];
ss.getSheetByName('Master Log')
.appendRow(entry.map(cell => values[cell.row - 1][cell.column - 1]));
};
However, as I am continuing on the project, I want to run some formulas on every row so that filter functions on other sheets have the information they need to know if they should show the rows or not. Those formulas will sit off to the right.
How do I convert the script above to put data into only the cells from column A until all the values have been entered, without minding that there are values to the right, rather than being defined as adding an entirely clean new row?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
