LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default elapsed time in msgbox

How can I format the result of somthing like
msgbox(now()-37790.0756944444)
as 0 years, 6 months, 19 days, 11 hours, 5 minutes, 17 seconds?
(the 37790.0756944444 is just an example, but the date will be constant). In a worksheet it's no problem,

"=DATEDIF($A$4,NOW(),""y"")&"" years, ""&DATEDIF($A$4,NOW(),""ym"")&"" months, ""&DATEDIF($A$4,NOW(),""md"")&"" days,"" &TEXT(NOW()-$A$4,""h"") &"" hours, "" &TEXT(NOW()-$A$4,""m"")&"" minutes, "" & TEXT(NOW()-$A$4,""s"") & "" seconds"""

The thing is, I don't need the woksheet, I just want to attach the elapsed time to a button that will calculate when clicked. It twould look cooler if it keeps calculating while it's up, but that part isn't necessary. Thanks in advance for any/all help.


 
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 elapsed tomas Excel Discussion (Misc queries) 0 December 11th 08 04:00 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Need Elapsed Time Help Jwy Excel Worksheet Functions 2 September 29th 05 03:54 AM
elapsed time Sweetpea60 Excel Worksheet Functions 6 March 2nd 05 04:41 PM
Elapsed Time Random Excel Programming 4 September 5th 03 01:18 PM


All times are GMT +1. The time now is 11:33 AM.

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

About Us

"It's about Microsoft Excel"