Error in Overlapping Time

meowbhow

New Member
Joined
May 31, 2018
Messages
21
Marcelo, please check the formula if it has some issue = SUM(IF(A$2:A$9999=A312,IF(1-((B312>C$2:C$9999)+(B$2:B$9999>C312)),IF(ROW(A$2:A$9999)>ROW(A312),IF(C$2:C$9999>C312,C312,C$2:C$9999)-IF(B$2:B$9999>B312,B$2:B$9999,B312)))))

Result should be 1 hour instead of 17:37 hours

Guzgi (USF) (Wateen OFS) Khuzdar2017-12-04 22:19:28
12/04/2017 23:59:59
17:37:20
Guzgi (USF) (Wateen OFS) Khuzdar2017-12-04 22:19:35
12/04/2017 23:59:59
15:56:49

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I don't understand your dates. The formula worked perfectly for me with proper dates as dd/mm/yyyy hh:mm:ss (April 12)


A
B
C
D
1
Name​
StartDate​
EndDate​
Result​
2
Guzgi (USF) (Wateen OFS) Khuzdar​
12/04/2017 22:19:28​
12/04/2017 23:59:59​
01:40:24​
3
Guzgi (USF) (Wateen OFS) Khuzdar​
12/04/2017 22:19:35​
12/04/2017 23:59:59​
00:00:00​

Array formula in D2
=SUM(IF(A$2:A$9=A2,IF(ROW(A$2:A$9)>ROW(A2),IF(1-(B$2:B$9>C2)+(B2>C$2:C$9),IF(C2>C$2:C$9,C$2:C$9,C2)-IF(B2>B$2:B$9,B2,B$2:B$9)))))
Ctrl+Shift+Enter

Adjust the dates and the formula should work.

M.
 
Upvote 0
How about this data ? I have adjusted the date but this is the issue i am facing now.
Pull (USF) Khuzdar2017-12-18 23:16:482017-12-19 00:29:482:35:56
Pull (USF) Khuzdar2017-12-18 23:17:182017-12-18 23:37:260:20:08
Pull (USF) Khuzdar2017-12-18 23:40:352017-12-19 00:01:260:41:42
Pull (USF) Khuzdar2017-12-19 00:55:282017-12-19 08:00:236:43:25
Pull (USF) Khuzdar2017-12-19 04:09:042017-12-19 07:54:550:00:00
Pull (USF) Khuzdar2017-12-19 03:24:502017-12-19 04:08:200:00:00
Pull (USF) Khuzdar2017-12-18 23:16:482017-12-19 00:29:480:41:57
Pull (USF) Khuzdar2017-12-19 00:29:582017-12-19 00:54:330:21:04
Pull (USF) Khuzdar2017-12-19 02:36:272017-12-19 02:59:350:00:00
Pull (USF) Khuzdar
2017-12-19 02:11:10
2017-12-19 02:34:15
0:00:00

<colgroup><col><col span="2"><col></colgroup><tbody>
</tbody>
 
Upvote 0
All the data is in ascending order now, but still same problem.
Pull (USF) Khuzdar2017-12-18 23:16:482017-12-19 00:29:482:35:56
Pull (USF) Khuzdar2017-12-18 23:16:482017-12-19 00:29:481:22:56
Pull (USF) Khuzdar2017-12-18 23:17:182017-12-18 23:37:260:00:00
Pull (USF) Khuzdar2017-12-18 23:40:352017-12-19 00:01:260:20:51
Pull (USF) Khuzdar2017-12-18 23:40:352017-12-19 00:01:260:00:00

<colgroup><col><col span="2"><col></colgroup><tbody>
</tbody>
 
Upvote 0
The formula worked perfectly for me


A
B
C
D
1
Name​
Start​
End​
Result​
2
Pull (USF) Khuzdar​
2017-12-18 23:16:48​
2017-12-19 00:29:48​
02:14:50​
3
Pull (USF) Khuzdar​
2017-12-18 23:16:48​
2017-12-19 00:29:48​
01:01:50​
4
Pull (USF) Khuzdar​
2017-12-18 23:17:18​
2017-12-18 23:37:26​
00:00:00​
5
Pull (USF) Khuzdar​
2017-12-18 23:40:35​
2017-12-19 00:01:26​
00:20:51​
6
Pull (USF) Khuzdar​
2017-12-18 23:40:35​
2017-12-19 00:01:26​
00:00:00​

<tbody>
</tbody>


D2
=SUM(IF(A$2:A$11=A2,IF(ROW(A$2:A$11)>ROW(A2),IF(1-(B$2:B$11>C2)+(B2>C$2:C$11),IF(C2>C$2:C$11,C$2:C$11,C2)-IF(B2>B$2:B$11,B2,B$2:B$11)))))
Ctrl+Shift+Enter

Please, enter carefully the formula when doing tests. I've to leave now. Good luck.

M.
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,685
Members
449,463
Latest member
Jojomen56

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top