Calculating Time



The data I have is imported into Excel as:

A1 A2
LOG_OFF 10/13/2009 09:50:45 AM
LOG_ON 10/13/2009 10:00:18 AM
CO_Incoming 10/13/2009 10:34:15 AM
CO_Incoming 10/13/2009 10:15:39 AM
LOG_OFF 10/13/2009 10:15:54 AM
LOG_ON 10/13/2009 10:27:13 AM
WRAP_ON 10/13/2009 10:34:45 AM
WRAP_OFF 10/13/2009 10:34:47 AM

Date and time are in the same cell (A2). How do I calculate total time off
between each LOG_OFF and LOG_ON? I used =INT(D8-D7)&"d
"&TEXT(MOD((D8-D7),1),"h:mm:ss"), but it doesn't apply to each row (I'm
guessing I need an IIF formula?). Also, the result is "Od 0:00:04" (for
example). I'll need the result to not include the "Od."

I'm using Excel 2007.

Thank you so much.


If I were you, I'd just strip out the numbers

Then, format as 'Custom' mm/dd/yyyy h:mm:ss

Then use that function you posted:
=INT(B15-B14)&"d "&TEXT(MOD((B15-B14),1),"h:mm:ss")



Hi Ryan. Thank you for your response. I tried the LOOKUP formula and it
didn't work. I don't understand it either, but I'm sure because I'm an
intermediate user.

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