Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Display countdown timer into custom shape with google app scripts

$
0
0

I currently have a countdown timer in google sheets using google app scripts as such:

    if(e.range.getA1Notation() == "G11"){  var ss = SpreadsheetApp.getActive();  var sh = ss.getSheetByName('Sheet3');  var m = 0;  var s = 10;  for (var i = -1; i < s; i--) {    if(s == 0 && m == 0) {      break;    }    else if(s == 0) {      s=59;      m--;    }    else {      s--;    }    SpreadsheetApp.flush();    Utilities.sleep(1000);    sh.getRange('B11').setValue(m+':'+s);  }}  }

Where the countdown will display into cell B11 when I update cell G11.

However I also have RANDBETWEEN formula in another sheet and every second my countdown timer updates the RANDBETWEEN formulas also recalculate. I would like the RANDBETWEEN formulas to only receive an update when I reset the countdown timer (Cell G11).

If I can somehow display the timer into a shape instead of in a cell would this solve my issue since I am no longer directly updating a cell? If so, how do I do so? But if not, are there any other solutions to achieve what im looking for?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>