PC Review


Reply
Thread Tools Rate Thread

Convert Hours and Minutes

 
 
Beep Beep
Guest
Posts: n/a
 
      2nd May 2008
I have a spreadsheet that has hours and minutes manually inputed. Is there a
formula that will convert the following: 38:90 (38 hours and 90 minutes) to
39 hours and 30 minutes?
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      2nd May 2008
Probably not the most efficient, but this works...

=(LEFT(A1,FIND(":",A1)-1)+INT(MID(A1,FIND(":",A1)+1,4)/60))
&" hours and "&MOD(MID(A1,FIND(":",A1)+1,4),60)&" minutes"

Rick


"Beep Beep" <(E-Mail Removed)> wrote in message
news:2654C9B7-B120-45B5-885A-(E-Mail Removed)...
>I have a spreadsheet that has hours and minutes manually inputed. Is there
>a
> formula that will convert the following: 38:90 (38 hours and 90 minutes)
> to
> 39 hours and 30 minutes?


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      2nd May 2008
=LEFT(A1,2)/24+RIGHT(A1,2)/(24*60) and format as [h]:mm
--
Gary''s Student - gsnu200783


"Beep Beep" wrote:

> I have a spreadsheet that has hours and minutes manually inputed. Is there a
> formula that will convert the following: 38:90 (38 hours and 90 minutes) to
> 39 hours and 30 minutes?

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      2nd May 2008
What if the user enters 123:123? You formula can be patched like this...

=LEFT(A1,FIND(":",A1)-1)/24+MID(A1,FIND(":",A1)+1,9)/(24*60)

However, I assumed from the OP's post that he wanted the result to read like
a sentence (xx hours and yy minutes) and not like a time value.

Rick


"Gary''s Student" <(E-Mail Removed)> wrote in message
news:E268B16E-94BB-4340-A350-(E-Mail Removed)...
> =LEFT(A1,2)/24+RIGHT(A1,2)/(24*60) and format as [h]:mm
> --
> Gary''s Student - gsnu200783
>
>
> "Beep Beep" wrote:
>
>> I have a spreadsheet that has hours and minutes manually inputed. Is
>> there a
>> formula that will convert the following: 38:90 (38 hours and 90 minutes)
>> to
>> 39 hours and 30 minutes?


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      2nd May 2008
An excellent improvement!

Any idea of why the TIME() function does not work??
--
Gary''s Student - gsnu200783


"Rick Rothstein (MVP - VB)" wrote:

> What if the user enters 123:123? You formula can be patched like this...
>
> =LEFT(A1,FIND(":",A1)-1)/24+MID(A1,FIND(":",A1)+1,9)/(24*60)
>
> However, I assumed from the OP's post that he wanted the result to read like
> a sentence (xx hours and yy minutes) and not like a time value.
>
> Rick
>
>
> "Gary''s Student" <(E-Mail Removed)> wrote in message
> news:E268B16E-94BB-4340-A350-(E-Mail Removed)...
> > =LEFT(A1,2)/24+RIGHT(A1,2)/(24*60) and format as [h]:mm
> > --
> > Gary''s Student - gsnu200783
> >
> >
> > "Beep Beep" wrote:
> >
> >> I have a spreadsheet that has hours and minutes manually inputed. Is
> >> there a
> >> formula that will convert the following: 38:90 (38 hours and 90 minutes)
> >> to
> >> 39 hours and 30 minutes?

>
>

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      2nd May 2008
> An excellent improvement!

Thanks!

> Any idea of why the TIME() function does not work??


My guess is that the 90, being greater than the maximum number of minutes
for the minutes field, makes it look like plain text to Excel rather than a
time (apparently colons alone is not enough to make Excel treat an entry as
a time value).

Rick


> Gary''s Student - gsnu200783
>
>
> "Rick Rothstein (MVP - VB)" wrote:
>
>> What if the user enters 123:123? You formula can be patched like this...
>>
>> =LEFT(A1,FIND(":",A1)-1)/24+MID(A1,FIND(":",A1)+1,9)/(24*60)
>>
>> However, I assumed from the OP's post that he wanted the result to read
>> like
>> a sentence (xx hours and yy minutes) and not like a time value.
>>
>> Rick
>>
>>
>> "Gary''s Student" <(E-Mail Removed)> wrote in
>> message
>> news:E268B16E-94BB-4340-A350-(E-Mail Removed)...
>> > =LEFT(A1,2)/24+RIGHT(A1,2)/(24*60) and format as [h]:mm
>> > --
>> > Gary''s Student - gsnu200783
>> >
>> >
>> > "Beep Beep" wrote:
>> >
>> >> I have a spreadsheet that has hours and minutes manually inputed. Is
>> >> there a
>> >> formula that will convert the following: 38:90 (38 hours and 90
>> >> minutes)
>> >> to
>> >> 39 hours and 30 minutes?

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to convert Hours to Days, Hours Minutes jamilla General Software 1 21st May 2010 03:31 AM
Convert Decimal Minutes to Hours-Minutes-Seconds Scott Microsoft Excel Programming 3 22nd Oct 2008 03:26 AM
Convert hours and minutes in time format into fractions of hours.. =?Utf-8?B?QWtlcm4=?= Microsoft Excel Worksheet Functions 4 21st Apr 2005 02:56 PM
MOD Function or how to convert total minutes to hours and minutes Brad Microsoft Access Reports 1 22nd Dec 2004 08:07 AM
Convert hours:minutes into days, hours, minutes Chinny Microsoft Excel Misc 3 19th Apr 2004 06:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:42 PM.