Time countdown...

J

jday

I would like to create a "countdown clock" that reflects the number of
hours/minutes/seconds remaining for an employee to work based upon their
scheduled start/stop time. In cell A1, I have a TIME() formula that reflects
their start time, and in cell B1, the same formula reflects their stop
time---for example:

A1 B1
=TIME(7,0,0) =TIME(15,0,0)

In the above example, the start time equates to 7:00 am and the stop time is
3:00 pm. Ultimately, I would like to show the "time remaining" based upon
this work schedule on any given workday. I tried using a NOW() formula to
first establish the current date/time, and then subtract this from cell B1,
but all I get is ##### symbols. Can anyone help guide me?
 
I

IanC

=NOW() gives the current date & time, not just the time. You need a formula
to extract the time

=TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))

You can then subtract this from B1.

Hope this helps.
 
G

Gary''s Student

This is because NOW() returns BOTH the date and the time. Therefore =B1-NOW()
is negative. Try:

=B1-(NOW()-TODAY())
and adjust the format
 
I

IanC

I didn't think of subtracting the date. A much neater solution than the one
I offered.
 
G

Glenn

Gary''s Student said:
This is because NOW() returns BOTH the date and the time. Therefore =B1-NOW()
is negative. Try:

=B1-(NOW()-TODAY())
and adjust the format


Or:

=B1-MOD(NOW(),1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top