I am trying to create a live timer. I want to show how many hours till closing THEN show how many hours till opening.
- WHEN the date is on a SUNDAY, I want to show that "market is closed".
- THEN if its any day other than Sunday it shows "Market opens in 00 hours, 00 minutes" or "Market closes in 00 hours, 00 minutes" with having the "hours" and "Minutes" changing from plural to singular WHEN Hours > 1 and Minutes > 1.
- So, the market starts at 10am (10:00) and closing is at 4pm (16:00).
I had a live timer, however you need to type the date and time.
=iferror(int(E11-now())&" "&if(days(E11,now())>1,"Days","Day")&" : "&hour(E11-now())&" "&if(hour(E11-now())>1,"Hours","Hour")&" : "&MINUTE(E11-now())&" "&if(MINUTE(E11-now())>1,"Minutes","Minute"),"0 Day : 0 Hour : 0 Minute")
With this code, it is giving the stats of if the market is closed or open but how many till closing or open. Attempted to use the code below and adjusting it to get a live count down but I can't :(.
=if(OR((weekday(H4))=1,(weekday(H4))=7),"Market Closed", if(time(hour(now()),minute(now()),second(now()))>TIME(16,0,0),"Market Closed",if((time(hour(now()),minute(now()),second(now()))>TIME(10,0,0)),"Market Open","Market Closed")))
Thanks
One way, perhaps a little verbose:
In File|Settings|Calculation, I chose update on change and every minute.