I saw this problem and the answer was perfect except that I do not want to delete the row. I only need the cells cleared of existing values.

How to move a row into another sheet?

  • Welcome. While it's very good that you included links to other questions on this site, questions should be self contained meaning it should include all the relevante details as the other question could be deleted.
    – Rubén
    Jun 2 '19 at 18:42
  • you can use something simple like this to "clear" the row either via the button or by including it in the previous script to be auto-executed

    function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet();
                                var source = ss.getRange("Sheet1!X1");
                            source.copyTo(ss.getRange("Sheet1!A2"), {contentsOnly: true}); 
                            source.copyTo(ss.getRange("Sheet1!B2"), {contentsOnly: true});
                            source.copyTo(ss.getRange("Sheet1!C2"), {contentsOnly: true});
                            source.copyTo(ss.getRange("Sheet1!D2"), {contentsOnly: true});
                            source.copyTo(ss.getRange("Sheet1!E2"), {contentsOnly: true});
                            source.copyTo(ss.getRange("Sheet1!F2"), {contentsOnly: true});
                            source.copyTo(ss.getRange("Sheet1!G2"), {contentsOnly: true}); }

  • where Sheet1!X1 is the empty cell that gets copied over the mentioned cells

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.