In Google Sheets Script, cells aren't updating when a value is changed from its original value "A" to "X" then back to "A". I have tried inserting Utilities.Sleep into the function to allow the spreadsheet time to update but this does not change the result.
Here is the code:
(Cell B14 is equal to "A" in the beginning on the spreadsheet)
function updater() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet 1");
var updating = "X"
sheet.getRange("B14").setValue(updating);
Utilities.sleep(5000)
sheet.getRange("B14").setValue("A");
}
Any help would be appreciated, thanks!