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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
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?
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,835
Messages
5,855,910
Members
431,772
Latest member
dannyboi1

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
Top