#1   Report Post  
Tim Mills
 
Posts: n/a
Default Time Calculation

Hi

I have 28-Jul-05 15:40:11 in cell D3 and would like to calculate the
period remaining until it is reached. I tried using NOW in another cell
and subtracting them but "VALUE" is always returned.

Is there a formula to return it in DD/MM or DD/MM/SS ?

TIA
Tim
  #2   Report Post  
aristotle
 
Posts: n/a
Default

Think this works?

=TEXT(D3-NOW(),"dd:hh:mm")

Regards,
A

"Tim Mills" wrote:

Hi

I have 28-Jul-05 15:40:11 in cell D3 and would like to calculate the
period remaining until it is reached. I tried using NOW in another cell
and subtracting them but "VALUE" is always returned.

Is there a formula to return it in DD/MM or DD/MM/SS ?

TIA
Tim

  #3   Report Post  
Tim Mills
 
Posts: n/a
Default

I still get the "VALUE" error message.
Could it be the format of either cell?
Tim


"aristotle" wrote:

Think this works?

=TEXT(D3-NOW(),"dd:hh:mm")

Regards,
A

"Tim Mills" wrote:

Hi

I have 28-Jul-05 15:40:11 in cell D3 and would like to calculate the
period remaining until it is reached. I tried using NOW in another cell
and subtracting them but "VALUE" is always returned.

Is there a formula to return it in DD/MM or DD/MM/SS ?

TIA
Tim

  #4   Report Post  
Rob Hick
 
Posts: n/a
Default

i would suspect that the "VALUE" error comes from the value in D3 being
text. If you select the value for editing (select cell and press F2)
and then press enter, it should recognise it as a proper date and the
function should work.

Aristotle's idea is the best, i think. and to build on it try the
following:

=TEXT(D3-NOW(),"d \da\y\s, h \hour\s, m \minut\e\s an\d s \s\econ\d\s")

regards
Rob

  #5   Report Post  
Rob Hick
 
Posts: n/a
Default

not sure why it would return value, unless the value in D3 is actually
text in which case you'll have to convert it to a date.

if you want to know how long, to the second, is left, you will have to
create a string yourself, such as:

=DAY(D3-NOW()) & " days, " & HOUR(D3-NOW()) & " hours, " &
MINUTE(D3-NOW()) & " minutes, " & SECOND(D3-NOW()) & " seconds"

The pattern should be obvious so you can make it as complex as you
need.

Rob



  #6   Report Post  
Jim Nicholls
 
Posts: n/a
Default

I'm not sure whether you want to calculate the difference between two dates,
two times or both. I'm assuming you just want to calculate the difference
between two dates (Below)

Cell A1 =Today()
Cell A2 = your target date
Cell A3 =Days360(A1,A2)
Cell A4 =Concatenate(A3," Days to go!")

If this isn't what your after I suggest doing this in VBA instead. I have
some sample code if you want it. Let me know.

Jim Nicholls




************************************************** ****

"Tim Mills" wrote:

Hi

I have 28-Jul-05 15:40:11 in cell D3 and would like to calculate the
period remaining until it is reached. I tried using NOW in another cell
and subtracting them but "VALUE" is always returned.

Is there a formula to return it in DD/MM or DD/MM/SS ?

TIA
Tim

  #7   Report Post  
Yoav Pollack
 
Posts: n/a
Default

=DAYS360(NOW(),LEFT(D3,9),0) would calculate the difference in days assuming
the date is always in the same format (i.e. always the first 9 characters)

calculating the difference in hours, minutes etc. is a bit more complicated

Yoav.

"Tim Mills" wrote:

Hi

I have 28-Jul-05 15:40:11 in cell D3 and would like to calculate the
period remaining until it is reached. I tried using NOW in another cell
and subtracting them but "VALUE" is always returned.

Is there a formula to return it in DD/MM or DD/MM/SS ?

TIA
Tim

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Calculation in Minutes only ? pgcam Excel Worksheet Functions 1 May 20th 05 04:46 PM
Time Sheet Calculation Help Needed! sax30 Excel Worksheet Functions 2 April 26th 05 08:08 PM
Time Calculation chintu49 Excel Worksheet Functions 2 February 16th 05 02:55 PM
elapsed time calculation rwf Excel Discussion (Misc queries) 1 January 21st 05 04:51 AM
Time calculation. shital shah Excel Worksheet Functions 2 January 20th 05 11:25 AM


All times are GMT +1. The time now is 06:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"