How do I get a total shift time when start time is PM and end time is AM?
-
I am doing a employee schedule that contains an if formula, then calculates their total shift time. Column A: has start time Column B: has end time Column C: calculates the total shift time, but also contains an if formula to show "0" if the word "off" is entered as follows: =(IF(A1="off",0,IF(B1>0, ((((B1-A1)*24-1))+IF(B1>A1,1))))) The problem I need help with is that if the shift start is 8:00 PM and the end time is 2:00 AM, I am receiving a result of -19. Columns A and B are formatted into time 00:00 AM/PM Any ideas? I thank you in advance!
-
Answer:
=IF(A2="off";0;IF((B2>A2);(B2-A2);(B2+(1… I use openOffice, which I believe uses semicolons where excel uses commas, so you'd have to change that. But the idea is, for your example of 8 pm to 2 am, you'd have 2 + (12-8). Since the stop time is the hours since midnight, you can just use that time - i.e. 4 am, use 4, 6 am, use 6... then for the start, subtract the start from 12 (8pm = 12 - 8 = 4 hours) then add those 2 numbers together. (time since midnight) + (time until midnight) = total shift time. - John http://www.teach-me-c.com
Karen B at Yahoo! Answers Visit the source
Related Q & A:
- Why do I get a message in German when I post on freecycle?Best solution by wiki.freecycle.org
- How do i get rid of the time on my toolbar?Best solution by Yahoo! Answers
- How can I get the remote server's date and time at the client side in my application in c#?Best solution by Stack Overflow
- How can I get around paying extra charges when traveling by train through Italy with a Eurail pass?Best solution by Yahoo! Answers
- How can I get a text alert when I get an email?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.