I am new to scripting and not sure how to approach that.
In short - I want the script to copy values from range L3:L118 to N3:N118 until a value of P3 (sum of differences between the 2 ranges) is 0.00. I managed to create a macro for the copying phase, however not sure how to loop it
Here is the code
function GetthepriceMK3() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('N3:N118').activate();
spreadsheet.getRange('L3:L118').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
}
Would anyone be able to help with the loop? No idea how to start and the ifs