Custom Formatting: 5.23 into 5 hrs. 14 mins.

I

Igorin

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.
 
S

Sean Timmons

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

Igorin

Thank you very much, Sean!

Excellent!

--
igor


Sean Timmons said:
=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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top