Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old July 21st 11, 01:32 PM posted to microsoft.public.excel.worksheet.functions
rlm rlm is offline
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2009
Posts: 4
Default Converting time to Minutes

Converting 5:08:00 using =(HOUR(D2) *60)+MINUTE(D2) works perfect.
That turns out 308 minutes.

However, converting 119:38:00 the same way doesn't work. As a matter
of fact, HOUR(XN) where the value of the cell XN = 119:38:00 returns
23. It should be 119.

How can I convert 119:38:00 to 7178 minutes?

  #2   Report Post  
Old July 21st 11, 02:26 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,866
Default Converting time to Minutes

Hi,

Am Thu, 21 Jul 2011 05:32:48 -0700 (PDT) schrieb rlm:

Converting 5:08:00 using =(HOUR(D2) *60)+MINUTE(D2) works perfect.
That turns out 308 minutes.


=D2*1440
and format General


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Old July 21st 11, 04:07 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2011
Posts: 829
Default Converting time to Minutes

"rlm" wrote:
Converting 5:08:00 using =(HOUR(D2) *60)+MINUTE(D2)
works perfect. That turns out 308 minutes.
However, converting 119:38:00 the same way doesn't work.



"Claus Busch" wrote:
Am Thu, 21 Jul 2011 05:32:48 -0700 (PDT) schrieb rlm:
=D2*1440
and format General


Although that does work by coincidence for D2 equal to 5:08:00 and
119:38:00, I would suggest the following instead:

=ROUND(D2*1440,0)

Try putting Claus's formula into D3, and put =D3-ROUND(D3,0)=0 into D4.
Then put 1:03:00 into D2. You will see that D4 is FALSE (!).

The point is: Excel time is stored as decimal fraction of a day. As with
all non-integers, the representation is usually not exact. See #2 below.

Some other details....

1. Note that I write =D3-ROUND(D3,0)=0 instead =D3=ROUND(D3,0).

The latter returns TRUE, but it is only an illusion due to the dubious
heuristic poorly described under the misleading title "Example When a Value
Reaches Zero" at http://support.microsoft.com/kb/78113. In other words,
Excel forces the latter difference to zero artificially. We cannot always
count on that.

2. I write ROUND(D3,0) instead of INT(D3).

This is because the floating-point representation of D3 when D2 is
1:03:00 is actually less than 63, namely
62.9999999999999,928945726423989981412887573242187 5. As it happens, Excel
INT(D3) does return 63 for that representation. But I argue that it is a
defect. Note that VBA Int(Range("d3")) returns 62, as I would expect.



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 Time to Hours & Minutes pugsly8422 Charts and Charting in Excel 5 April 1st 08 08:38 PM
Converting time formats into actual time(minutes) LeighM Excel Discussion (Misc queries) 2 October 30th 06 05:15 AM
Converting a decimal time into hours and minutes LizHough Excel Worksheet Functions 1 July 4th 06 11:00 AM
converting a number to time formatted as minutes JR Excel Worksheet Functions 2 February 9th 06 07:31 PM
Time - converting HH:MM:SS to Minutes Noel S Pamfree Excel Worksheet Functions 3 January 8th 05 04:26 PM


All times are GMT +1. The time now is 11:37 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017