DEV Community

Geet Sehgal
Geet Sehgal

Posted on

Need suggestions in creating a JavaScript

I want to work with two Google sheets at once. I have a row of data from cell B2 to G2. Everytime I open the sheet, I add another row under this one. I want to write a script to copy cell B2 to cell C4 of another sheet (let's call anothe sheet as sheet2). Similarly, for cell C2 to Cell D4 of sheet2 and so on.
I want all the cells till G2 to be copied to desired cells in sheet2 with the help of this script mapped to a button.I want the script to reset once the contents are pasted in sheet2 such that the counter sets to B3 now.

Furthermore, I want a script in a button to clear the contents of the desired cells by clicking once.

Any suggestions?

Many Thanks

Top comments (0)