Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Convert a number to Hours, Minutes, etc.

Hi,
How do I take a number, e.g., 170.5, and covert it to a weeks, days, hours,
and minutes, based on an 8 hour day and a 40 day week? Simple math just gives
me more decimals. I don't want 4.2625 weeks, I want 4 weeks, 1 day, 2 hours,
30 minutes. I want to be able to do this for any number using a formula or
group of formulas.

All help is greatly appreciated.

Thanks,
Bernie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Convert a number to Hours, Minutes, etc.

How about:
=INT(A1/40)&" weeks "&INT(MOD(A1,40)/8)&" days "&INT(MOD(A1,8))&" hours "
& INT(MOD(A1,1)*60)& " minutes"



berniean wrote:

Hi,
How do I take a number, e.g., 170.5, and covert it to a weeks, days, hours,
and minutes, based on an 8 hour day and a 40 day week? Simple math just gives
me more decimals. I don't want 4.2625 weeks, I want 4 weeks, 1 day, 2 hours,
30 minutes. I want to be able to do this for any number using a formula or
group of formulas.

All help is greatly appreciated.

Thanks,
Bernie


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 245
Default Convert a number to Hours, Minutes, etc.

In parts:

=INT(A1/40) & " weeks"
=INT(MOD(A1,40)/8) & " days"
=ROUND(MOD(A1,8),0) & " hours"
=ROUND((A1-INT(A1))*60,0) & " minutes."


Putting it all together:

=INT(A1/40) & " weeks, " & INT(MOD(A1,40)/8) & " days, "&
ROUND(MOD(A1,8),0)&" hours, " & ROUND((A1-INT(A1))*60,0) &" minutes."

--
Steve

"berniean" wrote in message
...
Hi,
How do I take a number, e.g., 170.5, and covert it to a weeks, days,
hours,
and minutes, based on an 8 hour day and a 40 day week? Simple math just
gives
me more decimals. I don't want 4.2625 weeks, I want 4 weeks, 1 day, 2
hours,
30 minutes. I want to be able to do this for any number using a formula or
group of formulas.

All help is greatly appreciated.

Thanks,
Bernie


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Convert a number to Hours, Minutes, etc.

Thanks Dave and Steve. I was playing around with INT, but not MOD, so
couldn't get it to work. Your solution works great.

"berniean" wrote:

Hi,
How do I take a number, e.g., 170.5, and covert it to a weeks, days, hours,
and minutes, based on an 8 hour day and a 40 day week? Simple math just gives
me more decimals. I don't want 4.2625 weeks, I want 4 weeks, 1 day, 2 hours,
30 minutes. I want to be able to do this for any number using a formula or
group of formulas.

All help is greatly appreciated.

Thanks,
Bernie

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 Total Hours and Minutes to Whole Number BobS9895 Excel Worksheet Functions 3 April 13th 06 07:56 PM
Is it possible to convert a number into hours and minutes le clef Excel Worksheet Functions 4 April 1st 06 05:43 PM
How do I convert a number of minutes into hours and minutes? gyrkin Excel Worksheet Functions 3 August 18th 05 11:12 PM
Convert a number of minutes like 400 into hours and minutes bloke Excel Worksheet Functions 3 June 24th 05 05:00 PM
Convert hours and minutes in time format into fractions of hours.. Akern Excel Worksheet Functions 4 April 21st 05 02:56 PM


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