OzGrid

How to calculate remaining time to a deadline

< Back to Search results

 Category: [Excel]  Demo Available 

How to  Calculate remaining time to a deadline

 

Requirement:

 

To build up a formula to display remaining hours, minutes, and seconds until deadline for a report. Deadline is always Wednesday 6:00 PM (can be changed later).

 

Solution:

 

Regarding the deadline formula, the Number 4 represents Wednesday ... and can obviously be changed for another day of the week ...

Code:
=TODAY()+7-WEEKDAY(TODAY()+7-4)+TIME(18,0,0)

Now regarding your ' remaining time to deadline ' formula ...

Let's assume in cell A2 you have = Now()

and in cell B2 you have the above formula for the Wednesday deadline ...

Then you could test the following formula :

Code:
=INT(B2-A2)&" days "&TEXT(B2-A2,"h"" hrs ""m"" mins ""s"" secs""")

 

Obtained from the OzGrid Help Forum.

Solution provided by Carim.

 

See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets

 

See also:

Insert time/date with click on cell but never update
How to create a time series frequency conversion
How to obtain True/False statement if times are within x minutes of each other
How to select time stamp ranges and assign the correct tour destination
How to format time format conversion from decimal numbers

 

Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


Gallery



stars (0 Reviews)