0

I have make more questions for this topic, the scrips are working, but i will add more cells to the script.

The script what i have.

function myFunction() { var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('blad1'), true);
  var cellValue = spreadsheet.getRange('A1').getValue();
var rowToUpdate = spreadsheet.getLastRow() + 1; //Gets the row after the last row on that sheet with data
  spreadsheet.getRange("B" + rowToUpdate).setValue(cellValue); //Sets the value to the next row to the value we grabbed earlier}

What I want is that the script reads cells A1: Z1 and fully up to A10: Z10, If I run the script again, than the information from A1: Z1 will put a row under it

  • Have you tried to modify your script to make it fits your needs? – Rubén Mar 6 at 18:57
  • Yes, i do. When i add more cells and i do the script than full up Google sheets al the cells from A10:Z1A with A1 untill row 1000 – Dijkgraaf Mar 6 at 19:46
  • I'm sorry, it's not clear what you mean. How you modified your script? By the other hand, do you already understand the basic concepts of JavaScript like declaring function and variables, for loops, ...? – Rubén Mar 6 at 21:16

Your Answer

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

Browse other questions tagged or ask your own question.