1

Currently I'm trying to setup a rental tracking spreadsheet in google sheets, for a DJ tech store. I would need some help with scripting a code for the "Add" button (see pictures in the links).

Sheet 1 Sheet 2

The functions might be quite simple to conceive, yet a bit tricky to code, therefore I'm here to ask for your help, ideas and suggestions.

What I would like to achieve is: By the click on the "Add" button on Sheet1, the data gets copy/pasted in the respective columns on the next empty row in the Sheet2.

Elaborating, I would need the code for a couple of strings like:

//select next empty row in Sheet2 //transfer and merge Sheet1 B5+B6 to Sheet2 column B (like Name space Surname) //transfer Sheet1 B8 to Sheet2 column C //transfer and merge Sheet1 D3:E12 to Sheet2 column D like "E3,'x ',D3,' + ',E4,'x ',D4,' + ',... and so on" //transfer Sheet1 B10 to Sheet2 column E //transfer Sheet1 B12 to Sheet2 column F //transfer Sheet1 B18 to Sheet2 column G

Any help or suggestion would be greatly appreciated. Thank you for you time and effort.

Original post here: https://productforums.google.com/forum/#!topic/docs/jXG-LV0dTSU;context-place=forum/docs

  • 2
    Please share a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – Ele Jan 24 '18 at 21:57
  • 1
    It looks you are asking others to write code for you. Do some research, write some code and post specific questions about the problem you have with the code. – progmatico Jan 24 '18 at 22:36
  • Hey! Thank you guys for your attention! I probably forgot to mention that I’m totaly new to all excel/g.spreadsheets, javascript and g.app script. Currently, to create the mentioned functions I’m sincerly clueless even after doing reserch all over google, therefore I decided to finally post here and ask for help. Any link to related/helpfull topics would be much apreciated. Also the mentioned functions are just a part of the code that I want the button to execute, so far by reserching stuff up I’we been able to create the reset button, but fo the rest i’m clueless. – Imants Koķis Jan 25 '18 at 06:30
  • To help you start with, you can refer to this documentation about [Quickstart: Macros, Menus, and Custom Functions](https://developers.google.com/apps-script/quickstart/macros). Also, if you need assistance on adding buttons, there is a discussion in this [SO post](https://stackoverflow.com/questions/28668766/adding-buttons-to-google-sheets-and-set-value-to-cells-on-clicking). From the [answers](https://stackoverflow.com/a/28677553/8342742), you will see illustrated step by step guide to create a button. – MαπμQμαπkγVπ.0 Jan 25 '18 at 12:31

0 Answers0