Trying to understand time values

uniden32

New Member
Joined
Sep 19, 2010
Messages
22
Using Mac Office 2011 to write this, will execute the spreadsheet on a system with Windows Office 2007.

I'm attempting to do a countdown timer where it calculates how much time is left until either 30 minutes past the hour, or to the top of the hour.

My next step is to figure out how to calculate when I have 1 minute remaining, 30 seconds, 10 seconds, 9, 8, 7, 6, etc.

Most of the timer routines I can find here, have the value of 86400. In fact, the script that VoG wrote for me in another post, uses:
Code:
If .Value <= (1 / 86400) Then
I'm assuming that since it's when the timer hits Zero, that it translate the time of 00:00 to less than or equal to 86400.

What I'm looking for is a formula to figure out what values I would need to equate to 30, 10, etc to set up if statements where I can change the color of the clock or cell where the clock is displayed at 30, 10, and every second before it hit's zero.

Hope that makes some sense.

Thanks again,

Ralph
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
In an Excel date/time, whole numbers are days since Jan 0, 1900, and the fractional part is time.

86400 = 60 * 24 is the number of seconds in a day. So, for 30s,

Code:
If .Value <= 30 / 86400 Then
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,544
Members
452,925
Latest member
duyvmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top