Making a digital clock in Google Sheets
therobinlord.com
therobinlord.com
https://docs.google.com/spreadsheets/d/1T3bv8ThluHc18ghI8u9m...
Thank you for the inspiration!
Learned about REGEXEXTRACT and parametrized Strings.
Powerfull stuff.
As my job involves more and more Google Sheets Engineering lately. I really appreciate this kind of hacks!
=iferror(regexextract(text(HOUR(A1),"##"),"^\d"),"0")
to =iferror(regexextract(text(HOUR(A1),"00"),"^\d"),"0")
The ## text format uses only as many digits as needed, while the 00 format pads to 0 digits.I wonder if this could be some sort of timezone/locale issue screwing up his regexes ... Although there is no obvious 7 in my current time)
I've used the script IDE a lot where it just made sense to do something in about 10 lines/a for-loop of normal procedural code rather than an unreadable chain of about 50 spreadsheet formulas in one cells.