I need to find a way to sort each line by Column A and then by Column D. The problem is that some events happened at the same time. The idea is to provide a timeline of each Incident Number in Column A. How can I get excel to know that if the timestamp is the same, the line that goes first is the one where the value in column B has to equal the value in column C in the row above it. Let's say the example below starts at A1. So C2 is OPENED and so is B3. That is what I want. But C3 is ASSIGNED and B4 is RECOVERED. The D row should be where C row is. Ideas?
[TABLE="width: 831"]
<tbody>[TR]
[TD]Incident: Number[/TD]
[TD]Old Value[/TD]
[TD]New Value[/TD]
[TD]Edit Date[/TD]
[TD]DUR[/TD]
[TD]does previous new equal this lines old[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD][/TD]
[TD]OPENED[/TD]
[TD]5/12/2019 7:57[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]OPENED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/12/2019 7:59[/TD]
[TD]2[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RECOVERED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/17/2019 15:05[/TD]
[TD]7626[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]ASSIGNED[/TD]
[TD]RECOVERED[/TD]
[TD]5/17/2019 15:05[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]ASSIGNED[/TD]
[TD]RECOVERED[/TD]
[TD]5/22/2019 9:46[/TD]
[TD]6881[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RECOVERED[/TD]
[TD]RESOLVED[/TD]
[TD]6/6/2019 18:05[/TD]
[TD]22099[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RESOLVED[/TD]
[TD]CLOSED[/TD]
[TD]7/11/2019 14:33[/TD]
[TD]50188[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD][/TD]
[TD]OPENED[/TD]
[TD]5/16/2019 14:11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]OPENED[/TD]
[TD]ACCEPTED[/TD]
[TD]5/17/2019 9:10[/TD]
[TD]1139[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ACCEPTED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/17/2019 9:11[/TD]
[TD]1[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]5/18/2019 14:40[/TD]
[TD]1769[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]PENDING RELEASE[/TD]
[TD]5/29/2019 18:29[/TD]
[TD]16069[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING RELEASE[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]6/27/2019 15:17[/TD]
[TD]41568[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]ASSIGNED[/TD]
[TD]7/17/2019 11:56[/TD]
[TD]28599[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]ASSIGNED[/TD]
[TD]7/25/2019 9:03[/TD]
[TD]11347[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]7/25/2019 9:03[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]8/6/2019 11:32[/TD]
[TD]17429[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]RECOVERED[/TD]
[TD]8/8/2019 10:17[/TD]
[TD]2805[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RECOVERED[/TD]
[TD]RESOLUTION SUBMITTED[/TD]
[TD]8/8/2019 10:17[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RESOLUTION SUBMITTED[/TD]
[TD]RESOLVED[/TD]
[TD]8/9/2019 7:15[/TD]
[TD]1258[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RESOLVED[/TD]
[TD]CLOSED[/TD]
[TD]8/9/2019 10:18[/TD]
[TD]183[/TD]
[TD]TRUE[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 831"]
<tbody>[TR]
[TD]Incident: Number[/TD]
[TD]Old Value[/TD]
[TD]New Value[/TD]
[TD]Edit Date[/TD]
[TD]DUR[/TD]
[TD]does previous new equal this lines old[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD][/TD]
[TD]OPENED[/TD]
[TD]5/12/2019 7:57[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]OPENED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/12/2019 7:59[/TD]
[TD]2[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RECOVERED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/17/2019 15:05[/TD]
[TD]7626[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]ASSIGNED[/TD]
[TD]RECOVERED[/TD]
[TD]5/17/2019 15:05[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]ASSIGNED[/TD]
[TD]RECOVERED[/TD]
[TD]5/22/2019 9:46[/TD]
[TD]6881[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RECOVERED[/TD]
[TD]RESOLVED[/TD]
[TD]6/6/2019 18:05[/TD]
[TD]22099[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3585[/TD]
[TD]RESOLVED[/TD]
[TD]CLOSED[/TD]
[TD]7/11/2019 14:33[/TD]
[TD]50188[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD][/TD]
[TD]OPENED[/TD]
[TD]5/16/2019 14:11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]OPENED[/TD]
[TD]ACCEPTED[/TD]
[TD]5/17/2019 9:10[/TD]
[TD]1139[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ACCEPTED[/TD]
[TD]ASSIGNED[/TD]
[TD]5/17/2019 9:11[/TD]
[TD]1[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]5/18/2019 14:40[/TD]
[TD]1769[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]PENDING RELEASE[/TD]
[TD]5/29/2019 18:29[/TD]
[TD]16069[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING RELEASE[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]6/27/2019 15:17[/TD]
[TD]41568[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]ASSIGNED[/TD]
[TD]7/17/2019 11:56[/TD]
[TD]28599[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]ASSIGNED[/TD]
[TD]7/25/2019 9:03[/TD]
[TD]11347[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]7/25/2019 9:03[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]ASSIGNED[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]8/6/2019 11:32[/TD]
[TD]17429[/TD]
[TD]FALSE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]PENDING CUSTOMER[/TD]
[TD]RECOVERED[/TD]
[TD]8/8/2019 10:17[/TD]
[TD]2805[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RECOVERED[/TD]
[TD]RESOLUTION SUBMITTED[/TD]
[TD]8/8/2019 10:17[/TD]
[TD]0[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RESOLUTION SUBMITTED[/TD]
[TD]RESOLVED[/TD]
[TD]8/9/2019 7:15[/TD]
[TD]1258[/TD]
[TD]TRUE[/TD]
[/TR]
[TR]
[TD]3658[/TD]
[TD]RESOLVED[/TD]
[TD]CLOSED[/TD]
[TD]8/9/2019 10:18[/TD]
[TD]183[/TD]
[TD]TRUE[/TD]
[/TR]
</tbody>[/TABLE]