Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
Default Duration in Hours (or hh:mm:ss)

Hi All,

I'm currently trying to create a column in a sheet which calculates the age
in hours (or hours and minutes, though hours is optimal) that have elapsed
since the date/time stamp in the column which proceeds it. Is there any way
to manage this outside of a VBA solution? I'm about as green as it gets when
it comes to VBA, and I'm sort of surprised to find that there isn't a
standard function (like datedif) which supports this. Any help would be
greatly appreciated.

Thanks

Jamie

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Duration in Hours (or hh:mm:ss)

=now()-prior cell

Format cell as time

Will change any time you type into the spreadsheet.

"MJW" wrote:

Hi All,

I'm currently trying to create a column in a sheet which calculates the age
in hours (or hours and minutes, though hours is optimal) that have elapsed
since the date/time stamp in the column which proceeds it. Is there any way
to manage this outside of a VBA solution? I'm about as green as it gets when
it comes to VBA, and I'm sort of surprised to find that there isn't a
standard function (like datedif) which supports this. Any help would be
greatly appreciated.

Thanks

Jamie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
Default Duration in Hours (or hh:mm:ss)

Thanks Sean--I considered using "NOW()", but was hung up on the dynamic
nature you mentioned. Of course I just realized moments ago that I'll be
saved as long as I only update it when the data's needed--once I make a pivot
of the data and port that over to the master workbook, it'll be a static
value.

Much appreciated!

--Jamie

"Sean Timmons" wrote:

=now()-prior cell

Format cell as time

Will change any time you type into the spreadsheet.

"MJW" wrote:

Hi All,

I'm currently trying to create a column in a sheet which calculates the age
in hours (or hours and minutes, though hours is optimal) that have elapsed
since the date/time stamp in the column which proceeds it. Is there any way
to manage this outside of a VBA solution? I'm about as green as it gets when
it comes to VBA, and I'm sort of surprised to find that there isn't a
standard function (like datedif) which supports this. Any help would be
greatly appreciated.

Thanks

Jamie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Duration in Hours (or hh:mm:ss)

=NOW()-A1 and format the cell appropriately, such as [h]:mm

If you want it converting to decimal hours, use =24*(NOW()-A1) and format as
General or number.
--
David Biddulph

"MJW" wrote in message
...
Hi All,

I'm currently trying to create a column in a sheet which calculates the
age
in hours (or hours and minutes, though hours is optimal) that have elapsed
since the date/time stamp in the column which proceeds it. Is there any
way
to manage this outside of a VBA solution? I'm about as green as it gets
when
it comes to VBA, and I'm sort of surprised to find that there isn't a
standard function (like datedif) which supports this. Any help would be
greatly appreciated.

Thanks

Jamie



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Duration in Hours (or hh:mm:ss)

If you don't want to use NOW(), you can put current time into a cell with
control-shift-colon, or current date with control-semi-colon, or both
together with control-semi-colon space control-shift-colon.
--
David Biddulph

"MJW" wrote in message
...
Thanks Sean--I considered using "NOW()", but was hung up on the dynamic
nature you mentioned. Of course I just realized moments ago that I'll be
saved as long as I only update it when the data's needed--once I make a
pivot
of the data and port that over to the master workbook, it'll be a static
value.


"Sean Timmons" wrote:

=now()-prior cell

Format cell as time

Will change any time you type into the spreadsheet.


"MJW" wrote:

Hi All,

I'm currently trying to create a column in a sheet which calculates the
age
in hours (or hours and minutes, though hours is optimal) that have
elapsed
since the date/time stamp in the column which proceeds it. Is there
any way
to manage this outside of a VBA solution? I'm about as green as it
gets when
it comes to VBA, and I'm sort of surprised to find that there isn't a
standard function (like datedif) which supports this. Any help would
be
greatly appreciated.

Thanks

Jamie





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Duration in Hours (or hh:mm:ss)

Note that using Ctrl + colon will truncate the seconds, so even if the
computer's clock is 09:23:58 it will come out as 09:23:00.



--
Regards,

Peo Sjoblom



"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
If you don't want to use NOW(), you can put current time into a cell with
control-shift-colon, or current date with control-semi-colon, or both
together with control-semi-colon space control-shift-colon.
--
David Biddulph



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
Excel calculation of duration in hours and minutes [email protected] Excel Worksheet Functions 4 February 9th 07 04:25 PM
Enter Hours duration over 24 SteveW New Users to Excel 1 September 5th 06 08:40 AM
fx duration sajid Excel Worksheet Functions 1 May 5th 06 09:28 AM
Duration citizens1stbank Excel Discussion (Misc queries) 0 July 15th 05 06:23 PM
Duration Tess Excel Discussion (Misc queries) 2 February 1st 05 03:39 PM


All times are GMT +1. The time now is 06: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"