-1

I have a Google Sheet with a table that looks something like this:

date value1 value2
day 2 foo foo
day 1 bar bar

Every day has a certain amount of records, and from time to time I add new records. The way I do it currently is:

  1. Shift existing rows down depending on how many rows I need to insert;
  2. Insert new records into the freed up cells.

I'd like to automate this with Google Scripts by making it be this way:

  1. Click on B1 and paste from clipboard;
  2. Have all the old rows automatically move down depending on how many rows are in what I'm pasting, and new rows be inserted into the freed up cells.

I wonder if there is a way to do this.

This is a good reference code, but I'm stuck on the "depending on" part.

  • This [article](https://stackoverflow.com/questions/73354149/how-to-get-value-from-clipboard-in-app-script) may be helpful but I don't think you will be able to do it in Google Sheets. – TheWizEd Aug 14 '23 at 16:42

0 Answers0