ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom Formatting: 5.23 into 5 hrs. 14 mins. (https://www.excelbanter.com/excel-discussion-misc-queries/204821-custom-formatting-5-23-into-5-hrs-14-mins.html)

Igorin

Custom Formatting: 5.23 into 5 hrs. 14 mins.
 
Hello,

I have a range of data (for time periods) that's in decimal format.

I need to have it formatted into time format ( h "hrs" mm "mins").

For example:

5.23 should be 5 hrs 14 mins.
3.79 should be 5 hrs. 47 mins.
etc.

How do I achieve this? I have tried with custom formatting but all formats I
have used convert 5.23 into 5 hrs. 31 mins., which is wrong.

Any ideas?

I appreciate all help.

--
igor

Sean Timmons

Custom Formatting: 5.23 into 5 hrs. 14 mins.
 
=INT(A2)&":"&INT(RIGHT((A2),LEN(A2)-FIND(".",A2))/100*60)

will show in h:mm format

Replace ":" with " hrs " and add &" mins" to get as h hrs mm mins

"Igorin" wrote:

Hello,

I have a range of data (for time periods) that's in decimal format.

I need to have it formatted into time format ( h "hrs" mm "mins").

For example:

5.23 should be 5 hrs 14 mins.
3.79 should be 5 hrs. 47 mins.
etc.

How do I achieve this? I have tried with custom formatting but all formats I
have used convert 5.23 into 5 hrs. 31 mins., which is wrong.

Any ideas?

I appreciate all help.

--
igor


Igorin

Custom Formatting: 5.23 into 5 hrs. 14 mins.
 
Thank you very much, Sean!

Excellent!

--
igor


"Sean Timmons" wrote:

=INT(A2)&":"&INT(RIGHT((A2),LEN(A2)-FIND(".",A2))/100*60)

will show in h:mm format

Replace ":" with " hrs " and add &" mins" to get as h hrs mm mins

"Igorin" wrote:

Hello,

I have a range of data (for time periods) that's in decimal format.

I need to have it formatted into time format ( h "hrs" mm "mins").

For example:

5.23 should be 5 hrs 14 mins.
3.79 should be 5 hrs. 47 mins.
etc.

How do I achieve this? I have tried with custom formatting but all formats I
have used convert 5.23 into 5 hrs. 31 mins., which is wrong.

Any ideas?

I appreciate all help.

--
igor


Sean Timmons

Custom Formatting: 5.23 into 5 hrs. 14 mins.
 
Thank you for the feedback!

"Igorin" wrote:

Thank you very much, Sean!

Excellent!

--
igor


"Sean Timmons" wrote:

=INT(A2)&":"&INT(RIGHT((A2),LEN(A2)-FIND(".",A2))/100*60)

will show in h:mm format

Replace ":" with " hrs " and add &" mins" to get as h hrs mm mins

"Igorin" wrote:

Hello,

I have a range of data (for time periods) that's in decimal format.

I need to have it formatted into time format ( h "hrs" mm "mins").

For example:

5.23 should be 5 hrs 14 mins.
3.79 should be 5 hrs. 47 mins.
etc.

How do I achieve this? I have tried with custom formatting but all formats I
have used convert 5.23 into 5 hrs. 31 mins., which is wrong.

Any ideas?

I appreciate all help.

--
igor



All times are GMT +1. The time now is 01:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com