Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
WBJ WBJ is offline
external usenet poster
 
Posts: 2
Default How do I convert hours to days?

I am entering start-times and end-times (cols. A & B) and calculating the
duration (col B - col A) in C. I want to format the sum of all durations --
28:30, for instance (28 hours, 30 minutes) for an 8-hour day as 3 days, 4
hours, 30 minutes.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default How do I convert hours to days?

Assuming the sum of all durations in cell A1
To return the value of days =DAY(A1*3)
To return number of remaining hours =(+A1*3-DAY(A1*3))*8
To return minutes = MINUTE(A1)

If you wish you can display all 3 formula together in one cell by
joining them with
=DAY(A1*3)&" days "&(A1*3-DAY(A1*3))*8&" hours "&MINUTE(A1)&" minutes"
Let me know if this helps
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I convert hours to days?

Have you looked at that with a value of more than 31/3 days in A1?
If you want to go down that route, rather than DAY(A1*3) try MOD(A1*3,1)
Rather than =(+A1*3-DAY(A1*3))*8 you may want =MOD(A1*3,1)*8, and you may
want INT around it if you want whole number of hours?
--
David Biddulph

"Steven" wrote in message
...
Assuming the sum of all durations in cell A1
To return the value of days =DAY(A1*3)
To return number of remaining hours =(+A1*3-DAY(A1*3))*8
To return minutes = MINUTE(A1)

If you wish you can display all 3 formula together in one cell by
joining them with
=DAY(A1*3)&" days "&(A1*3-DAY(A1*3))*8&" hours "&MINUTE(A1)&" minutes"
Let me know if this helps



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default How do I convert hours to days?

Thanks for tweeking the HOURS formula - so much smoother than mine.
I see the problem with the DAY formula if the value 31 days but I
don't understand the MOD formula will yield the correct answer.
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
Convert hours to days Greg Excel Discussion (Misc queries) 8 January 30th 08 10:07 PM
Convert days in decimal to days:hours:minutes Todd F. Excel Worksheet Functions 7 March 16th 06 07:17 PM
Convert decimal days to Days,hours, minutes Todd F. Excel Worksheet Functions 3 March 14th 06 03:38 PM
i need to convert seconds (ie: 17288.35111) into days, hours, min jriechers Excel Discussion (Misc queries) 1 September 27th 05 10:06 PM
How to convert hours in days? Tony Excel Worksheet Functions 3 March 9th 05 04:09 PM


All times are GMT +1. The time now is 12:21 PM.

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"