How do I sort things in the right order when events happen at the same time

jconkl02

Board Regular
Joined
May 25, 2016
Messages
55
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]
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Is this what you're looking for?


Book1
ABCDEF
1Incident: NumberOld ValueNew ValueEdit DateDUR3rd Sort Level
23585OPENED5/12/2019 7:57TRUE
33585OPENEDASSIGNED5/12/2019 7:592FALSE
43585ASSIGNEDRECOVERED5/17/2019 15:050FALSE
53585RECOVEREDASSIGNED5/17/2019 15:057626FALSE
63585ASSIGNEDRECOVERED5/22/2019 9:466881FALSE
73585RECOVEREDRESOLVED6/6/2019 18:0522099FALSE
83585RESOLVEDCLOSED7/11/2019 14:3350188FALSE
93658OPENED5/16/2019 14:11TRUE
103658OPENEDACCEPTED5/17/2019 9:101139FALSE
113658ACCEPTEDASSIGNED5/17/2019 9:111FALSE
123658ASSIGNEDPENDING CUSTOMER5/18/2019 14:401769FALSE
133658PENDING CUSTOMERPENDING RELEASE5/29/2019 18:2916069FALSE
143658PENDING RELEASEPENDING CUSTOMER6/27/2019 15:1741568FALSE
153658PENDING CUSTOMERASSIGNED7/17/2019 11:5628599FALSE
163658ASSIGNEDPENDING CUSTOMER7/25/2019 9:030FALSE
173658PENDING CUSTOMERASSIGNED7/25/2019 9:0311347FALSE
183658ASSIGNEDPENDING CUSTOMER8/6/2019 11:3217429FALSE
193658PENDING CUSTOMERRECOVERED8/8/2019 10:172805FALSE
203658RECOVEREDRESOLUTION SUBMITTED8/8/2019 10:170FALSE
213658RESOLUTION SUBMITTEDRESOLVED8/9/2019 7:151258FALSE
223658RESOLVEDCLOSED8/9/2019 10:18183FALSE
Sheet3
Cell Formulas
RangeFormula
F2=NOT(B2=C1)
F3=NOT(B3=C2)
F4=NOT(B4=C3)
F5=NOT(B5=C4)
F6=NOT(B6=C5)
F7=NOT(B7=C6)
F8=NOT(B8=C7)
F9=NOT(B9=C8)
F10=NOT(B10=C9)
F11=NOT(B11=C10)
F12=NOT(B12=C11)
F13=NOT(B13=C12)
F14=NOT(B14=C13)
F15=NOT(B15=C14)
F16=NOT(B16=C15)
F17=NOT(B17=C16)
F18=NOT(B18=C17)
F19=NOT(B19=C18)
F20=NOT(B20=C19)
F21=NOT(B21=C20)
F22=NOT(B22=C21)
 
Upvote 0
I am looking for that result, but I have like 4000 rows to sort out. I'm trying to avoid going through all 4000 lines to manually sort it out. Column F on my sheet is how I am identifying the ticket numbers I need to a 2nd look at.
 
Upvote 0
In my post I included the formula to put into column F. So, throw that formula in, copy it down, then sort the range by Item Number, then by Edit Date, then by column F. The sort dialogue will have 3 levels in that order.
 
Upvote 0
Solution
Irobbo314,

I appreciate the help. Your idea helped, but for some reason did not catch every instance. I ended up just hunting them down manually. However I greatly appreciate your help.
Jason
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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