I am currently storing a value each day using the function below:
function addTrigger() {
ScriptApp.newTrigger("updateCell").timeBased().atHour(13).everyDays(1).create();
}
function updateCell() {
var url = "https://docs.google.com/spreadsheets/d/12yxNcp0n5_-------------d6B81m6QcjrKXTQDvyx0/edit#gid=377838361";
var cellOut = "L23";
var cellIn = "B19";
var value = SpreadsheetApp.openByUrl(url).getRange(cellIn).getValue();
SpreadsheetApp.openByUrl(url).getRange(cellOut).setValue(value);
}
I would like to be able to increment the row value each time that the script is run. Since the variable call is done at each run of the script I would assume that there is no global variables to use. So how could one have a variable that increment with each run of the script.
I have read about using PropertiesService to make a sort of global variable, however there must be some more standardized way to increment a value for each time a script is run in google sheets scripts.
I am fully aware that I need to set my Range using Col and Row arguments so I do not need assistance on that, but on how to increment the value that I can put in as the Row.
Truly thankful for your help