# Formula hr:min:secs to dd:hh:mins (based on a 8 hr shift)

Hi,

I need a formula that changes hh/mm/secs to dd/hr/mins based on a 8 hr shift

Find the attachment

Thanks
Formula.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IT Services ConsultantCommented:
Hi,

Please this formula in any other cell than [A2]:
=VALUE(LEFT(TEXT(A2,"[h]:mm:ss"),FIND(":",TEXT(A2,"[h]:mm:ss"))-1))/8

Then format that cell as a Number (with zero decimal places).

Alternatively,...
=TEXT(VALUE(LEFT(TEXT(A2,"[h]:mm:ss"),FIND(":",TEXT(A2,"[h]:mm:ss"))-1))/8,"0") & " days"

Q_28711098.xlsx
Excel & VBA ExpertCommented:
Not sure what output you are expecting, but try this to see if this what you are trying to achieve...

``````=INT(LEFT(TEXT(A2,"[h]:mm:ss"),FIND(":",TEXT(A2,"[h]:mm:ss"))-1)/8)&":"&MOD(LEFT(TEXT(A2,"[h]:mm:ss"),FIND(":",TEXT(A2,"[h]:mm:ss"))-1),8)&":"&MINUTE(A2)
``````

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Thank you Experts ... for your prompt response .. these formula was just exactly what I was looking for
Excel & VBA ExpertCommented:
IT Services ConsultantCommented:
Err... you're welcome!

...but sktneer's formula gives...

306:2:26

Not 306 (days) as you asked for in the attachment.
Excel & VBA ExpertCommented:
@fanpages

Cool. :)

If output is correct, the strings "days", "Hours" and "Minutes" can be added into the formula.
Author Commented:
Fanpage,

I wanted the same format dd:hh:min

Thank you.
IT Services ConsultantCommented:
Row 1 in your attachment differs from the result you have in Cell [B5],... but OK, no harm done.

Author Commented:
I see your point. my apologies that was just a calculation on my part to show the days I wanted ..

I still wanted the hours and minutes
IT Services ConsultantCommented:
OK.

No problem.
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.