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
Sebastian068Asked:
Who is Participating?
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.

[ fanpages ]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"

Please see the attached workbook.
Q_28711098.xlsx
1
Subodh Tiwari (Neeraj)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)

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

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

Start your 7-day free trial
Sebastian068Author Commented:
Thank you Experts ... for your prompt response .. these formula was just exactly what I was looking for
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Sebastian! Glad it worked as per your requirement.
0
[ fanpages ]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.
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
@fanpages

Cool. :)

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

I wanted the same format dd:hh:min

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

Q_28711098---attachment.jpg
0
Sebastian068Author 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
0
[ fanpages ]IT Services ConsultantCommented:
OK.

No problem.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.