Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Convert decimal to hr.mm

I have to take a decimal like 22.59 which is already in hr.mm (22 hrs 59 min)
and be able to add and subtract values for a cumulative total in hr.mm
format. This seems too simple but for some reason when I apply previous
suggestions I've found in earlier posts it keeps giving me a VALUE error. Any
suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Convert decimal to hr.mm

=INT((TIME(INT(A1),MOD(A1,1)*100,0)-TIME(INT(A2),MOD(A2,1)*100,0))*24)+
(MOD((TIME(INT(A1),MOD(A1,1)*100,0)-TIME(INT(A2),MOD(A2,1)*100,0))*24,1)*60/100)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Clekn" wrote in message
...
I have to take a decimal like 22.59 which is already in hr.mm (22 hrs 59
min)
and be able to add and subtract values for a cumulative total in hr.mm
format. This seems too simple but for some reason when I apply previous
suggestions I've found in earlier posts it keeps giving me a VALUE error.
Any
suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Convert decimal to hr.mm

=TIME(A1,100*MOD(A1,1),0) if your times are no more than 23:59.
=INT(A1/24)+TIME(A1,100*MOD(A1,1),0) if it might be more than 24 hours.
Remember that if it goes beyond 24 hours, to see the hours without the 24
hour wrap-round you'd need to format the relevant cells as [h]:mm, rather
than h:mm.
--
David Biddulph

"Clekn" wrote in message
...
I have to take a decimal like 22.59 which is already in hr.mm (22 hrs 59
min)
and be able to add and subtract values for a cumulative total in hr.mm
format. This seems too simple but for some reason when I apply previous
suggestions I've found in earlier posts it keeps giving me a VALUE error.
Any
suggestions?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Convert decimal to hr.mm

If the time is more (or less also) than 24 hours **and** if the OP's time
format is as shown (2-places for the minutes, meaning single digit minute
values have leading zeroes), then I think this shorter formula can be
used...

=--SUBSTITUTE(A1,".",":")

Rick


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=TIME(A1,100*MOD(A1,1),0) if your times are no more than 23:59.
=INT(A1/24)+TIME(A1,100*MOD(A1,1),0) if it might be more than 24 hours.
Remember that if it goes beyond 24 hours, to see the hours without the 24
hour wrap-round you'd need to format the relevant cells as [h]:mm, rather
than h:mm.
--
David Biddulph

"Clekn" wrote in message
...
I have to take a decimal like 22.59 which is already in hr.mm (22 hrs 59
min)
and be able to add and subtract values for a cumulative total in hr.mm
format. This seems too simple but for some reason when I apply previous
suggestions I've found in earlier posts it keeps giving me a VALUE error.
Any
suggestions?




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 Min & Hrs to Min in Decimal David127 Excel Discussion (Misc queries) 6 November 14th 07 02:55 PM
How can I convert decimal commas to decimal points? Peteylepieu Excel Discussion (Misc queries) 1 October 2nd 07 10:18 PM
Convert Hrs:Min to Decimal Hrs DaveJhelpexcel Excel Discussion (Misc queries) 3 June 30th 05 07:33 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
hex to decimal convert Nadia Excel Worksheet Functions 4 January 16th 05 10:36 PM


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

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

About Us

"It's about Microsoft Excel"