I'm fairly new to Google Sheets. I followed a youtube video about adding an Add Row button using appscript.
It worked, however, upon adding a new row, the formulas aren't automatically added, I had to copy it manually every time.
The following is the script I used for the button:
function addRow() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var range = ss.getActiveRange();
var R = range.getRowIndex();
sheet.insertRowsBefore(5, 1);
}
I'd greatly appreciate it if you could help me. Thanks!



