I have this data and I am tracking the consecutive and multiple occurrence of defect code.
Consecutive defect code are those that appear under the same area and line consecutively.
Multiple are those defect code that appear 3 times or more (even if not conscutive)
under the same area and line.
Area Line Lot # Date Code Description Assy Line1 LOT000000001 10/3/2013 13:31 5c Vibration fail Assy Line12 LOT000000002 10/3/2013 13:25 5g Key Malfunction Labl Line2 LOT000000003 10/3/2013 13:08 5a No charge Dice Line1 LOT000000004 10/3/2013 13:03 5b System Fail Dice Line2 LOT000000005 10/3/2013 13:09 3j Sofwware fail Dice Line3 LOT000000006 10/3/2013 13:29 5d No display Circ Line1 LOT000000007 10/3/2013 13:25 3n Short Circ Line1 LOT000000008 10/3/2013 13:38 3n Short Circ Line10 LOT000000009 10/3/2013 13:26 3n Short Circ Line12 LOT000000010 10/3/2013 13:30 3n Short Circ Line2 LOT000000011 10/3/2013 13:02 3n Short Circ Line3 LOT000000012 10/3/2013 13:15 3n Short Circ Line7 LOT000000013 10/3/2013 13:24 3n Short Circ LineA LOT000000014 10/3/2013 13:10 3o Open Circ LineA LOT000000015 10/3/2013 13:14 3n Short Circ LineA LOT000000016 10/3/2013 13:46 3c High Res Circ LineA LOT000000017 10/3/2013 13:47 3n Short Circ LineA LOT000000018 10/3/2013 13:50 3o Open Circ LineA LOT000000019 10/3/2013 13:51 3n Short Circ LineA LOT000000020 10/3/2013 13:55 3b Low Res OSTS Line1 LOT000000021 10/3/2013 13:48 3b Low Res OSTS Line1 LOT000000022 10/3/2013 13:50 3f No Trace OSTS Line11 LOT000000023 10/3/2013 13:06 3a No Signal OSTS Line2 LOT000000024 10/3/2013 13:24 3a No Signal
In this case, my expected result would be:
Circ Line1 LOT000000007 10/3/2013 13:25 3n Short Circ Line1 LOT000000008 10/3/2013 13:38 3n Short
for the consecutive occurrence.
and this for the multiple occurrence.
Circ LineA LOT000000015 10/3/2013 13:14 3n Short Circ LineA LOT000000017 10/3/2013 13:47 3n Short Circ LineA LOT000000019 10/3/2013 13:51 3n Short
So the original data is on Sheet1 and I want the result transferred in Sheet2 with the same header.
What I did is to pass the original data into an array and then iterate through it.
I am not getting what I want though. The code is long so I did not bother to post.
And I think is it easier to make a new code than to debug mine.
Any help will be much appreciated. Thanks in advance.
If you still have questions, just fire it away.




Cire Line1andCirc Line1together for the consecutive occurrence? or isCirea typo?Circ. thanks.