Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Convert Hours and Minutes

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert Hours and Minutes

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" wrote in message
...
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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Convert Hours and Minutes

=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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert Hours and Minutes

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" wrote in message
...
=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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Convert Hours and Minutes

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" wrote in message
...
=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?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert Hours and Minutes

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" wrote in
message
...
=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
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
I have 3053 minutes and I want to convert to hours and minutes John B Excel Discussion (Misc queries) 2 March 25th 10 08:21 PM
I need to convert 157.25 minutes, into hours, minutes and seconds. Al Excel Discussion (Misc queries) 2 March 11th 09 09:04 AM
Convert total minutes to hours and minutes Derek Excel Discussion (Misc queries) 3 December 5th 06 02:24 AM
How do I convert 184 minutes into 3:04 (3 hours:4 minutes) in EXCE tpendy Excel Discussion (Misc queries) 2 October 18th 05 02:28 AM
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 04:48 AM.

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"