I am using this function. It works well as an onEdit function. But, sometimes when I check more than one boxes quickly, the onEdit functions instantly stops the running execution in the middle and runs the new execution. Causing incomplete transfer of data to Sheet 2.
So, how can I convert this into a regular function? So, it completely processes/ transfers all the rows present in sheet 1 to sheet 2.
Dummy sheet link: https://docs.google.com/spreadsheets/d/1EvmWZsnAJK-htYNiPkgYK5oowl8uzOoz1CILvADC93I/edit?usp=sharing
function onEdit(e) {
const sh=e.range.getSheet();
if(sh.getName()=="Sheet 1" && e.range.columnStart==1 && e.value=="TRUE") {
const tsh=e.source.getSheetByName('Sheet 2');
const nr=tsh.getLastRow()+1;
sh.getRange(e.range.rowStart,2,1,1).copyTo(tsh.getRange(nr,2,1,1));
sh.getRange(e.range.rowStart,4,1,1).copyTo(tsh.getRange(nr,4,1,1));
sh.getRange('E2:E').copyTo(tsh.getRange(nr,11,1,1));
}
}