I am transitioning from Excel and VBA to Google Sheets and admittedly, don't know JavaScript.
I see that there is a common request for some VBA which will copy down the formulas from the row above, when I insert a new row anywhere in the dataset. I know how to add a butt, and i used the Macro Recorder to record the insertion of a Row, but the recorder only records that particular row that I chose to insert above.
I'd like the script to grab the activecell row number, so that it is dynamic on where ever my cursor is.
Here's the code I have so far. Can someone help me correct it?
function test() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getActiveCell().getRow().activate();
spreadsheet.getActiveSheet().insertRowsBefore(spreadsheet.getActiveCell().getRow(), 1);
spreadsheet.getActiveCell().offset(0, 0, 1, spreadsheet.getActiveCell().getNumColumns()).activate();
};

