0

I want to automatically add row in Google Spreadsheets when I type information in row 5 by Google script.

]1

0
function onEdit(e){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('sheetName');
  var range = e.range;
  var row = range.getRow();
  sheet.insertRowAfter(row);
}
  • 1
    Welcome. Please add a brief description of your answer by the technical side, code isn't indexed by the social side more people could understand your answer if you describe it and explain how to use it. Ref. How to Answer – Rubén May 8 at 15:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.