In Google Sheets I'm setting up a sheet with a column of formulas referencing a cell in which there is an hourly rate. That hourly rate can occasionally change, but I don't want previous calculations to be affected, only future calculations (ie, cells further down the column).
A great script solution was posted here: How do you replace a formula with its result?
With this script from red red wine:
function freezeOutput(){
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet");
var range = sheet.getRange("A1:A10");
range.copyTo(range, {contentsOnly:true});
}
But because formulas that have not yet been "triggered" show as "$0.00" in my column, those cells are converted from formulas to 0's.
Is there any way to make this script work on a cell only if the formula result is > 0?