I'm trying to insert row via script using this code
function insertrow() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var ws = ss.getActiveSheet();
var name = Browser.inputBox('Row Will Be Inserted after ID...');
var offset=9;
name= name+offset;
Logger.log(name);
ws.insertRowAfter(name);
}
But would to insert via INPUT BOX a reference that should be offset.
E.g. I would insert row after position 18 but user should insert 9 and automatically the script has to calculate 9+9. If I try my script does 18+9=189
.
How can face with? And If I want to ask to add multiple rows is there any suggestion?