Sunday, June 15, 2014

yogi_ Copy Data From Some Rows Of Sheet1 Of Main Spreadsheet So That Data Can Be Edited Without Affecting the Data In Main Spreadsheet

                                         Google Spreadsheet   Post  #1674
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   Jun-15-2014
post by Lizzerle: (https://productforums.google.com/forum/#!mydiscussions/docs/9Y2L6N0PCIU)
Script for copying new rows to another spreadsheet
I would be most grateful for your help. I have a spreadsheet which gets updated with form submissions. I need to keep this intact. So I created another copy of this spreadsheet which is a separate file - not linked to the original spreadsheet. I know I could use importrange to update the copy of the spreadsheet, but I don't want to use it because it would not be possible to edit the copy. I have been trying to find a script that would automatically update the copy with new rows from the original spreadsheet as it gets new submissions, but failed miserably. Can you help? I very much hope so.
---
Thank you very much for your kind reply.

I have created two spreadsheets (old Google sheets) called Main Sheet and Copy of Main Sheet.
The Main Sheet has columns A to G with headers and four rows of data.

The Copy of Main Sheet has columns A to F with two rows.The last column F is not in the Main Sheet as it is intended only for the Copy of the Main Sheet - it is configured with data validation.

here is the link to the Main Sheet:
https://docs.google.com/spreadsheet/ccc?key=0ArTs_MwgtoXydE5ZMkRkWXhad3lDYjJ4ajdCd0xCREE&usp=sharing

and here is the link to the Copy of Main Sheet:
https://docs.google.com/spreadsheet/ccc?key=0ArTs_MwgtoXydExIcVdubTRmdTdUblJvY2dlN2xlT2c&usp=sharing

I would like to copy the additional two rows or any other subsequent rows automatically from the Main Sheet to the Copy of Main Sheet - but only from columns A to E (Timestamp, First Name, Surname, Gender, Pets? in the Main Sheet.

I know I could use the importrange formula like this =importrange("spreadsheet-key","Sheet1!A:E"), but that would not allow me any edits. The point is that I would like to be able to edit the Copy of Main Sheet without affecting the Main Sheet and add additional information into the remaing column F or any other columns I might insert into the Copy of Main Sheet later.

I hope this makes sense? I don't have any other formulas I am afraid.
 I very much hope you'll be able to help.

------------------------------------------------------------------------------------------------------------------------------