I keep track of inventory. I need to know the item's age in days. It would be preferable to enter the current age and have it count up from that value. I have this script
function increment() {
var s = SpreadsheetApp.getActive().getSheetByName('Sheet5').getRange('A1');
var cur = parseInt(s.getValue());
s.setValue(cur + 5);
}
My problem is I want to apply this to an entire column, but only want fields in that column currently with a value to increase by 1 each night. If the field is blank today, it needs to be blank tomorrow until a value is manually added.