My script is in a google spreadsheet document Here is my script:
ss = SpreadsheetApp.getActiveSpreadsheet();
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "10 Rows", functionName: "TenRows"},
{name: "20 Rows", functionName: "TwentyRows"},
{name: "30 Rows", functionName: "ThirtyRows"},
{name: "40 Rows", functionName: "FortyRows"},
{name: "50 Rows", functionName: "FiftyRows"}]
ss.addMenu("Insert Rows", menuEntries);
}
function TenRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,10);
}
function TwentyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,20);
}
function ThirtyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,30);
}
function FortyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,40);
}
function FiftyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,50);
}
In column C of my spreadsheet I have a string of numbers going down each row.
Like this
C
7317
7316
7315
7314
7313
When I run my script to insert a number of rows, How can I make it so it automatically continues this ascending number and inputs it into the C column?
Thanks