Copy Paste Data, Remove Filter, Apply Filter, Delete Filtered Data
Copy Paste Data, Remove Filter, Apply Filter, Delete Filtered Data function UpdateRationDistributionData (){ const ss = SpreadsheetApp . getActiveSpreadsheet (); const sh1 = ss . getSheetByName ( 'Form Responses 1' ); const lastRow1 = sh1 . getDataRange (). getLastRow ()- 1 ; const sh2 = ss . getSheetByName ( 'Ration Distribution Raw Data' ); const lastRow2 = sh1 . getDataRange (). getLastRow ()- 1 ; sh2 . getRange ( 'A1' ). setValue ( 'Member ID' ); sh2 . getRange ( 2 , 1 , lastRow2 ). setFormulaR1C1 ( '="M-" & LEFT(RC[32],4) &"-" & "Ration" & "-" & REPT(0,5-LEN(ROW()-1)) & ROW()-1' ); const lastRow3 = sh2 . getDataRange (). getLastRow (); sh2 . getRange ( 'A1:A' + lastRow3 ). copyTo ( sh2 . getRange ( 'A1' ), ...