I'm working with the following table:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 827"]
<tbody>[TR]
[TD]EVENTID[/TD]
[TD]PAGE[/TD]
[TD]STATUS[/TD]
[TD]TYPE[/TD]
[TD]JOBID[/TD]
[TD]TIMESTAMP[/TD]
[TD]Time Elapsed: Days[/TD]
[TD]Time Elapsed: Hours[/TD]
[/TR]
[TR]
[TD="align: right"]49239521[/TD]
[TD]Scheduler[/TD]
[TD]Created[/TD]
[TD]Private[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Wednesday, June 28, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49239522[/TD]
[TD]Scheduler[/TD]
[TD]New[/TD]
[TD]Assigned[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Wednesday, July 5, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50682764[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Thursday, September 21, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50682775[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Thursday, September 21, 2017[/TD]
[TD="align: right"]03:10:29[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD]Reviewer[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Monday, September 25, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD="align: right"]03:10:29:13[/TD]
[/TR]
[TR]
[TD="align: right"]50725746[/TD]
[TD]Reviewer[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Monday, September 25, 2017[/TD]
[TD="align: right"]00:22:15[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50746671[/TD]
[TD]Reviewer[/TD]
[TD]Finalized[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Tuesday, September 26, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50752728[/TD]
[TD][/TD]
[TD]Locked[/TD]
[TD][/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Tuesday, September 26, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49267081[/TD]
[TD]Scheduler[/TD]
[TD]Created[/TD]
[TD]Private[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Wednesday, June 28, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49267082[/TD]
[TD]Scheduler[/TD]
[TD]New[/TD]
[TD]Assigned[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Friday, July 7, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50335478[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 4, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50446072[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Saturday, September 9, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50446074[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Saturday, September 9, 2017[/TD]
[TD="align: right"]02:02:47[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50471615[/TD]
[TD]Reviewer[/TD]
[TD]Finalized[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 11, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD="align: right"]02:02:47:54[/TD]
[/TR]
[TR]
[TD="align: right"]50473794[/TD]
[TD][/TD]
[TD]Locked[/TD]
[TD][/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 11, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
The TIMESTAMP column was in the format of dd:mm:yy hh:mm (there are several spaces between the date and the time) but I converted it to the Long Date format so I could calculate the difference between two dates based on specific criteria. I did not think it would work otherwise.
Initially, I wanted to know the amount of time elapsed between each time a "Shopper" (Column "Page") placed a report in "Completed (Column "Status") and a "Reviewer" (Column "Page") changed the status of the report. Since it was always the "Reviewer" that made the next action, the "Reviewer" is always in the row immediately after the row where the "Shopper" put a report in "Completed." Thus, I was able to use the following formula to correctly calculate the amount of time elapsed between the two events:
=IF(ISERROR(IF(AND($B5="Shopper", $C5="Completed"),$I6-$I5,IF(AND($B5="", $C5=""),$I6-$I5,"UNDEFINED"))),"",(IF(AND($B5="Shopper", $C5="Completed"),$I6-$I5,IF(AND($B5="", $C5=""),$I6-$I5,"UNDEFINED"))))
(Note: the cell references, ($B5="Shopper", $C5="Completed"), do not necessarily match up with the table excerpt above; they are merely illustrative.)
The result/output of the formula is in the "Time Elapsed: Hours" Column. However, the date stamp is modified to show days, hours, minutes, seconds; (dd:hh:mm:ss), so it is not actually the number of hours that have elapsed, it the the number of days, hours, minutes, and seconds that have elapsed.
My question is whether there is a way to modify the formula above so that it retrieves the time elapsed between when a "Shopper" puts a report in "Completed" and when the "Reviewer" completes any action whatsoever? For example, in the chart below, would it be possible to have a formula that calculates the time elapsed between the first event (50682775) and the second event (50722162) as well as between the first event (50682775) and the third event (50725746)?
[TABLE="class: grid, width: 827"]
<tbody>[TR]
[TD="align: right"]50682775[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[/TR]
[TR]
[TD="align: right"]50722162[/TD]
[TD]Reviewer[/TD]
[TD]Incomplete[/TD]
[/TR]
[TR]
[TD="align: right"]50725746[/TD]
[TD]Reviewer[/TD]
[TD]Completed[/TD]
[/TR]
</tbody>[/TABLE]
There are seven different actions that the "Reviewer" can take.
Ideally, the formula could be copied down the entire sheet.
I can provide clarification where needed, but I hope this is enough to get us started.
I appreciate any help that you can provide.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 827"]
<tbody>[TR]
[TD]EVENTID[/TD]
[TD]PAGE[/TD]
[TD]STATUS[/TD]
[TD]TYPE[/TD]
[TD]JOBID[/TD]
[TD]TIMESTAMP[/TD]
[TD]Time Elapsed: Days[/TD]
[TD]Time Elapsed: Hours[/TD]
[/TR]
[TR]
[TD="align: right"]49239521[/TD]
[TD]Scheduler[/TD]
[TD]Created[/TD]
[TD]Private[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Wednesday, June 28, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49239522[/TD]
[TD]Scheduler[/TD]
[TD]New[/TD]
[TD]Assigned[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Wednesday, July 5, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50682764[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Thursday, September 21, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50682775[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Thursday, September 21, 2017[/TD]
[TD="align: right"]03:10:29[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD]Reviewer[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Monday, September 25, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD="align: right"]03:10:29:13[/TD]
[/TR]
[TR]
[TD="align: right"]50725746[/TD]
[TD]Reviewer[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Monday, September 25, 2017[/TD]
[TD="align: right"]00:22:15[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50746671[/TD]
[TD]Reviewer[/TD]
[TD]Finalized[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Tuesday, September 26, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50752728[/TD]
[TD][/TD]
[TD]Locked[/TD]
[TD][/TD]
[TD="align: right"]6622643[/TD]
[TD="align: right"]Tuesday, September 26, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49267081[/TD]
[TD]Scheduler[/TD]
[TD]Created[/TD]
[TD]Private[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Wednesday, June 28, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]49267082[/TD]
[TD]Scheduler[/TD]
[TD]New[/TD]
[TD]Assigned[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Friday, July 7, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50335478[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 4, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50446072[/TD]
[TD]Shopper[/TD]
[TD]Incomplete[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Saturday, September 9, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50446074[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Saturday, September 9, 2017[/TD]
[TD="align: right"]02:02:47[/TD]
[TD]UNDEFINED[/TD]
[/TR]
[TR]
[TD="align: right"]50471615[/TD]
[TD]Reviewer[/TD]
[TD]Finalized[/TD]
[TD]Submitted[/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 11, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD="align: right"]02:02:47:54[/TD]
[/TR]
[TR]
[TD="align: right"]50473794[/TD]
[TD][/TD]
[TD]Locked[/TD]
[TD][/TD]
[TD="align: right"]6630464[/TD]
[TD="align: right"]Monday, September 11, 2017[/TD]
[TD]UNDEFINED[/TD]
[TD]UNDEFINED[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
The TIMESTAMP column was in the format of dd:mm:yy hh:mm (there are several spaces between the date and the time) but I converted it to the Long Date format so I could calculate the difference between two dates based on specific criteria. I did not think it would work otherwise.
Initially, I wanted to know the amount of time elapsed between each time a "Shopper" (Column "Page") placed a report in "Completed (Column "Status") and a "Reviewer" (Column "Page") changed the status of the report. Since it was always the "Reviewer" that made the next action, the "Reviewer" is always in the row immediately after the row where the "Shopper" put a report in "Completed." Thus, I was able to use the following formula to correctly calculate the amount of time elapsed between the two events:
=IF(ISERROR(IF(AND($B5="Shopper", $C5="Completed"),$I6-$I5,IF(AND($B5="", $C5=""),$I6-$I5,"UNDEFINED"))),"",(IF(AND($B5="Shopper", $C5="Completed"),$I6-$I5,IF(AND($B5="", $C5=""),$I6-$I5,"UNDEFINED"))))
(Note: the cell references, ($B5="Shopper", $C5="Completed"), do not necessarily match up with the table excerpt above; they are merely illustrative.)
The result/output of the formula is in the "Time Elapsed: Hours" Column. However, the date stamp is modified to show days, hours, minutes, seconds; (dd:hh:mm:ss), so it is not actually the number of hours that have elapsed, it the the number of days, hours, minutes, and seconds that have elapsed.
My question is whether there is a way to modify the formula above so that it retrieves the time elapsed between when a "Shopper" puts a report in "Completed" and when the "Reviewer" completes any action whatsoever? For example, in the chart below, would it be possible to have a formula that calculates the time elapsed between the first event (50682775) and the second event (50722162) as well as between the first event (50682775) and the third event (50725746)?
[TABLE="class: grid, width: 827"]
<tbody>[TR]
[TD="align: right"]50682775[/TD]
[TD]Shopper[/TD]
[TD]Completed[/TD]
[/TR]
[TR]
[TD="align: right"]50722162[/TD]
[TD]Reviewer[/TD]
[TD]Incomplete[/TD]
[/TR]
[TR]
[TD="align: right"]50725746[/TD]
[TD]Reviewer[/TD]
[TD]Completed[/TD]
[/TR]
</tbody>[/TABLE]
There are seven different actions that the "Reviewer" can take.
Ideally, the formula could be copied down the entire sheet.
I can provide clarification where needed, but I hope this is enough to get us started.
I appreciate any help that you can provide.