Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Hours between to two times
I am trying to calculate the hours between 22:00 and 08:00.
The e.g. below shows a worker finishes work at 14:00pm on 1/10/2008 and starts work at 12:00pm on 2/10/2008 the next day, so their is 10 hours between 22:00(10Pm) and 08:00(8am). The formula below does not seem to bring back the correct result. =IF(M46="","0",MAX($K$40-$M46,0)+MAX($K$39-$O45,0)) Result = 8 should be 10 Cell K39 = 22:00:00 Cell K40 = 8:00:00 Cell O45 = 14:00:00 1/10/2008 Cell M46 = 12:00:00 2/10/2008 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Hours between to two times
Try =B1-A1+(A1B1) where A1 is the start time and B1 is the end time. If the end time is earlier than the start time (e.g. start at 22:00 and end at 8:00), the expression (A1B1) evaluates to TRUE and TRUE's numeric equivalent 1 is added to the difference. Since the value 1 is the same as 24 hours, the function adds 1 to the end time which makes it as if the end time is the following day. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Wed, 15 Oct 2008 15:27:02 -0700, Dave08 wrote: I am trying to calculate the hours between 22:00 and 08:00. The e.g. below shows a worker finishes work at 14:00pm on 1/10/2008 and starts work at 12:00pm on 2/10/2008 the next day, so their is 10 hours between 22:00(10Pm) and 08:00(8am). The formula below does not seem to bring back the correct result. =IF(M46="","0",MAX($K$40-$M46,0)+MAX($K$39-$O45,0)) Result = 8 should be 10 Cell K39 = 22:00:00 Cell K40 = 8:00:00 Cell O45 = 14:00:00 1/10/2008 Cell M46 = 12:00:00 2/10/2008 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Hours between to two times
This formula is returning the total hours between finish and start times, not
the hours between 10pm and 8am. "Chip Pearson" wrote: Try =B1-A1+(A1B1) where A1 is the start time and B1 is the end time. If the end time is earlier than the start time (e.g. start at 22:00 and end at 8:00), the expression (A1B1) evaluates to TRUE and TRUE's numeric equivalent 1 is added to the difference. Since the value 1 is the same as 24 hours, the function adds 1 to the end time which makes it as if the end time is the following day. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Wed, 15 Oct 2008 15:27:02 -0700, Dave08 wrote: I am trying to calculate the hours between 22:00 and 08:00. The e.g. below shows a worker finishes work at 14:00pm on 1/10/2008 and starts work at 12:00pm on 2/10/2008 the next day, so their is 10 hours between 22:00(10Pm) and 08:00(8am). The formula below does not seem to bring back the correct result. =IF(M46="","0",MAX($K$40-$M46,0)+MAX($K$39-$O45,0)) Result = 8 should be 10 Cell K39 = 22:00:00 Cell K40 = 8:00:00 Cell O45 = 14:00:00 1/10/2008 Cell M46 = 12:00:00 2/10/2008 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Hours between to two times
This has been cross posted to 'New Users'... Pl. refer to the solution there...
-- Always provide your feedback... "Dave08" wrote: This formula is returning the total hours between finish and start times, not the hours between 10pm and 8am. "Chip Pearson" wrote: Try =B1-A1+(A1B1) where A1 is the start time and B1 is the end time. If the end time is earlier than the start time (e.g. start at 22:00 and end at 8:00), the expression (A1B1) evaluates to TRUE and TRUE's numeric equivalent 1 is added to the difference. Since the value 1 is the same as 24 hours, the function adds 1 to the end time which makes it as if the end time is the following day. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Wed, 15 Oct 2008 15:27:02 -0700, Dave08 wrote: I am trying to calculate the hours between 22:00 and 08:00. The e.g. below shows a worker finishes work at 14:00pm on 1/10/2008 and starts work at 12:00pm on 2/10/2008 the next day, so their is 10 hours between 22:00(10Pm) and 08:00(8am). The formula below does not seem to bring back the correct result. =IF(M46="","0",MAX($K$40-$M46,0)+MAX($K$39-$O45,0)) Result = 8 should be 10 Cell K39 = 22:00:00 Cell K40 = 8:00:00 Cell O45 = 14:00:00 1/10/2008 Cell M46 = 12:00:00 2/10/2008 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Peak call times/hours | Excel Worksheet Functions | |||
Calculation of hourly rate times hours times 1.5 | Excel Worksheet Functions | |||
=Text(b2-A2,"h") hours between 2 times, what do I do for 10 times | New Users to Excel | |||
How do I find the amount of hours between times? | Excel Discussion (Misc queries) | |||
How do I convert times from hours to minutes? | Excel Discussion (Misc queries) |