function ABCDEF() {
var ss=SpreadsheetApp.getActive();
var s=ss.getSheetByName('Sheet1');
var ds=ss.getSheetByName("Sheet2");
var simDataList=['A4:AL428'];
var oA=[];
for(var i=0;i<simDataList.length;i++) {
var vA=s.getRange(simDataList[i]).getValues();//get data from each range
for(var j=0;j<vA.length;j++) {
oA.push(vA[j]);//append each row to output array
}
}
ds.getRange(ds.getLastRow()+1,1,oA.length,oA[0].length).setValues(oA);
}
Function works but I need to trim the data, Sheet 1 should not change.
Is there a way to remove ALL rows if column B has string value of "XYZ" or an EMPTY value, WHEN the function triggers/paste it on Sheet2. Again, Sheet 1 should not be updated.