digital TIX clock in Google Sheets
Asked Answered
I

3

0

a quick search brings zero results so I wonder if this could be done in google sheets or if someone ever even attempted it...

background: basically it's a clock divided into 4 fields, where every field represents 1 digit based on the sum of randomly lit squares

enter image description here

which reads as 15:35

Ichthyosis answered 12/2, 2021 at 6:48 Comment(0)
I
1

set time zone if needed
set recalculation on change and every minute

enter image description here


conditional formatting is set that font and background color are same for range B2:M4
custom formulae are simple for each of four colors:

=1=B2

=2=B2

=3=B2

=4=B2

and the main arrayformula in B2 is:

=INDEX(IFERROR(1/(1/{
 VLOOKUP(SEQUENCE(3, 1), {SEQUENCE(3), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 1, 1), 1, 1, ); 
 SEQUENCE(3-MID(TEXT(NOW(), "hhmm"), 1, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(3, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 2, 1), 1, 2, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 2, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 2), {SEQUENCE(6), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 3, 1), 1, 3, ); 
 SEQUENCE(6-MID(TEXT(NOW(), "hhmm"), 3, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(6, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 4, 1), 1, 4, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 4, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, )})))

enter image description here



for vertical tix clock:

=INDEX(IFERROR(1/(1/{
 VLOOKUP(SEQUENCE(1, 3), {SEQUENCE(3), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 1, 1), 1, 1, ); 
 SEQUENCE(3-MID(TEXT(NOW(), "hhmm"), 1, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(3, 1), )}, 2, ); {0,0,0}; 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 2, 1), 1, 2, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 2, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, ); {0,0,0}; 
 VLOOKUP(SEQUENCE(2, 3), {SEQUENCE(6), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 3, 1), 1, 3, ); 
 SEQUENCE(6-MID(TEXT(NOW(), "hhmm"), 3, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(6, 1), )}, 2, ); {0,0,0}; 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 4, 1), 1, 4, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 4, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, )})))

enter image description here



or rounded design:

=INDEX(IF(""=IFERROR(1/(1/{
 VLOOKUP(SEQUENCE(3, 1), {SEQUENCE(3), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 1, 1), 1, 1, ); 
 SEQUENCE(3-MID(TEXT(NOW(), "hhmm"), 1, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(3, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 2, 1), 1, 2, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 2, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 2), {SEQUENCE(6), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 3, 1), 1, 3, ); 
 SEQUENCE(6-MID(TEXT(NOW(), "hhmm"), 3, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(6, 1), )}, 2, ), {0;0;0}, 
 VLOOKUP(SEQUENCE(3, 3), {SEQUENCE(9), SORT(QUERY({SEQUENCE(MID(TEXT(NOW(), "hhmm"), 4, 1), 1, 4, ); 
 SEQUENCE(9-MID(TEXT(NOW(), "hhmm"), 4, 1), 1,,)}, "where Col1 matches '\d'", ), RANDARRAY(9, 1), )}, 2, )})),,"⚫"))

enter image description here



demo spreadsheet

Ichthyosis answered 12/2, 2021 at 6:49 Comment(0)
I
0

in case you like an analog clock you may use this formula:

=INDEX(LET(а, SEQUENCE(37,1,,10), б, RADIANS(а), в, SEQUENCE(12,1,30,30), г, RADIANS(в),
 д,SEQUENCE(4,1,90,90), е, RADIANS(д), ж, RADIANS(SEQUENCE(MINUTE(NOW())/60*360,1,1,1)),
 з, RADIANS((MOD(HOUR(NOW()), 12)/12*360)+MINUTE(NOW())/60*30), 
 SPARKLINE({QUERY({0,0,1;0,0,0.8; а, SIN(б), COS(б); в, 0.9*SIN(г), 0.9*COS(г); 
 в, SIN(г), COS(г); д, 0.8*SIN(е), 0.8*COS(е); д, SIN(е), COS(е)}, 
 "select Col2,Col3 order by Col1", ); 
 IFERROR(SIN(ж), 0), IFERROR(COS(ж), 1);0,0;0.75*SIN(з), 0.75*COS(з)}, 
 {"linewidth", 2; "color", "red"})))

enter image description here

Ichthyosis answered 15/2, 2021 at 13:18 Comment(0)
I
0

or try this old-school digital clock:

=INDEX(IFERROR(1/(1/TRANSPOSE(SPLIT(FLATTEN(SPLIT(TEXTJOIN(" ", 1, IFNA(
 HLOOKUP(REGEXEXTRACT(TEXT(NOW(), "xH:MM"), "(.)(.)(.)(.)?(.)?(.)?"), TRANSPOSE({
 1, "0 0 0 0 0 ० 0 0 0 0 0 ० 1 0 0 0 0 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 2, "1 0 1 1 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 1 1 0 1 ० 0 0 0 0 0 ०";
 3, "1 0 0 0 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 4, "1 1 1 0 0 ० 0 0 1 0 0 ० 0 0 1 0 0 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 5, "1 1 1 0 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 0 1 1 1 ० 0 0 0 0 0 ०";
 6, "1 1 1 1 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 0 1 1 1 ० 0 0 0 0 0 ०";
 7, "1 0 0 0 0 ० 1 0 0 0 0 ० 1 0 0 0 0 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 8, "1 1 1 1 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 9, "1 1 1 0 1 ० 1 0 1 0 1 ० 1 0 1 0 1 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 0, "1 1 1 1 1 ० 1 0 0 0 1 ० 1 0 0 0 1 ० 1 1 1 1 1 ० 0 0 0 0 0 ०";
 IF((HOUR(NOW())<10)+(HOUR(NOW())>12), "x", "×"),  REPT("0 0 0 0 0 ० ", 5); 
 ":", "0 1 0 1 0 ० 0 0 0 0 0 ०"}&""), 2, 0))), "०")), " ")))))

enter image description here

supported formats:

H:M
H:MM
HH:MM
xH:MM
H:M AM/PM
H:MM AM/PM
HH:MM AM/PM
xH:M AM/PM
xH:MM AM/PM


enter image description here

note: every digit design is stored in the transposed state

Ichthyosis answered 16/2, 2021 at 21:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.