Excel- Total no of days and hours calculation

  • Thread starter Thread starter vakka
  • Start date Start date
V

vakka

Hi

I have a situation where, a machine breaks down on 2/14/2003 10:00A
and it is fixed on 2/15/2003 11:00AM.

I need to get the total days and hrs the machine is not used i.e
day 1 Hour as my answer. please any one
 
Hi
one way (if A1 and B1 stores your data)
=INT(B1)-INT(A1)-(MOD(B1,1)<MOD(A1,1)) & " day(s), " &
(MOD(B1,1)-MOD(A1,1)+(MOD(B1,1)<MOD(A1,1)))*24 & " hours"
if you want the result in one cell
 

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

Back
Top