Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Convertin hours into days, hours and minutes

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 225
Default Convertin hours into days, hours and minutes

Use
=INT((Q5))&" day "&TEXT(Q5,"hh"" hours"" mm"" minutes""")

why are you dividing by 7.5? and multiplying by 24?

"Jock" wrote:

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Convertin hours into days, hours and minutes

Because there's 7½ hours in a working day. Here anyway. Therefore 15 hours
and 13 minutes will equate to 2 (working) days and 13 minutes i.e 2d 0h 13m
--
Traa Dy Liooar

Jock


"Sheeloo" wrote:

Use
=INT((Q5))&" day "&TEXT(Q5,"hh"" hours"" mm"" minutes""")

why are you dividing by 7.5? and multiplying by 24?

"Jock" wrote:

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 69
Default Convertin hours into days, hours and minutes

Dear Jock,

Following formula will solve your problem

=INT(LEFT(TEXT(Q5,"hh:mm"),2)/7.5)&"d
"&INT((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TE XT(Q5,"hh:mm"),4,2))/60)&"h
"&(((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TEXT (Q5,"hh:mm"),4,2))/60)-INT((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TEXT (Q5,"hh:mm"),4,2))/60))*60&"m "
--
HARSHAWARDHAN.S.SHASTRI

Pl do not forget to press "YES" button if post found useful.


"Jock" wrote:

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Convertin hours into days, hours and minutes

Thanks for this. It works ok up until 24 hours is exceeded. I am using a
cumulative total of hours and there could be 200 plus hours in Q5.
Thanks for trying though
--
Traa Dy Liooar

Jock


"HARSHAWARDHAN. S .SHASTRI" wrote:

Dear Jock,

Following formula will solve your problem

=INT(LEFT(TEXT(Q5,"hh:mm"),2)/7.5)&"d
"&INT((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TE XT(Q5,"hh:mm"),4,2))/60)&"h
"&(((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TEXT (Q5,"hh:mm"),4,2))/60)-INT((MOD(LEFT(TEXT(Q5,"hh:mm"),2),7.5)*60+MID(TEXT (Q5,"hh:mm"),4,2))/60))*60&"m "
--
HARSHAWARDHAN.S.SHASTRI

Pl do not forget to press "YES" button if post found useful.


"Jock" wrote:

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Convertin hours into days, hours and minutes

Your MOD function is looking for the excess over 7.5 days. You presumably
intended it to be the excess over 7.5 hours, so it would be MOD(Q5,7.5/24)
--
David Biddulph


"Jock" wrote in message
...
Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather
than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 225
Default Convertin hours into days, hours and minutes

In that case use
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5/24),"hh"" hours"" mm"" minutes""")

See David's post for the explanation...


"Jock" wrote:

Because there's 7½ hours in a working day. Here anyway. Therefore 15 hours
and 13 minutes will equate to 2 (working) days and 13 minutes i.e 2d 0h 13m
--
Traa Dy Liooar

Jock


"Sheeloo" wrote:

Use
=INT((Q5))&" day "&TEXT(Q5,"hh"" hours"" mm"" minutes""")

why are you dividing by 7.5? and multiplying by 24?

"Jock" wrote:

Common question and I've looked at a number of different answers in the
forum. None quite work for me though.
I can get the days part ok using INT, its the leftover hours and minutes
which is giving me grief" The following nearly gets the
=INT((Q5/7.5)*24)&" day "&TEXT(MOD(Q5,7.5),"hh"" hours"" mm"" minutes""")
However with 15:13 (hh:mm) in cell Q5, the result is 2 d 15h 13m rather than
2d 0h 13m

Any ideas?

--
Traa Dy Liooar

Jock

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
converting Days Hours & minutes into just minutes in excel Six Sigma Blackbelt Excel Discussion (Misc queries) 5 April 28th 06 09:45 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
Problem converting Hours to Days, Hours, Minutes Zyzzx Excel Worksheet Functions 4 October 24th 05 04:19 PM
converting hours to days,hours,minutes L_n_da Excel Worksheet Functions 2 May 29th 05 06:16 PM


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