Time Question

Grimbo2k

Board Regular
Joined
Sep 28, 2004
Messages
74
Hi all
Hopefully this is a simple question

I have a date in the future and I need a formula which tells me how many days/hours/mins/secs remain based on current time/date

ie

10 days, 4 hours, 3 mins, 20 seconds remaining

Had a quick play with it and got stuck !

Any thoughts much appreciated

Regards
Grimbo
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hello,

A1 = 28/09/2006 12:00

B1 = 29/09/2006 12:30

D1 = =(B1-A1)*1440*60

E1 (days) = =ROUNDDOWN((D1/86400),0)

F1 (hours) = =ROUNDDOWN((D1-(E1*86400))/3600,0)

G1 (mins) = =ROUNDDOWN((D1-(E1*86400)-(F1*3600))/60,0)

H1 (secs) = =ROUNDDOWN((D1-(E1*86400)-(F1*3600)-(G1*60))/60,0)


you could combine these into one cell, with "days", "mins" etc added - but its nearly lunch.

this is the one cell formula

=ROUNDDOWN(((B1-A1)*1440*60/86400),0)& " days "&ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400))/3600,0)&" hours "& ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400)-(ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400))/3600,0)*3600))/60,0)&" mins "&ROUND((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400)-(ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400))/3600,0)*3600)-(ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400)-(ROUNDDOWN(((B1-A1)*1440*60-(ROUNDDOWN(((B1-A1)*1440*60/86400),0)*86400))/3600,0)*3600))/60,0)*60),0) & "secs"

I'm sure thes is an easier way though (is Aladin about) or anyone else?
 
Upvote 0
With your future date in A1

=INT(A1-NOW())&" days,"&TEXT(A1-NOW(),"h \hour\s, m \mi\n\s, s")&" seconds remaining"

although it won't update automatically, only when worksheet is recalculated (which you can initiate by hitting F9)
 
Upvote 0

Forum statistics

Threads
1,213,556
Messages
6,114,284
Members
448,562
Latest member
Flashbond

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