In my example above, this is data I am left with after I assign values to an existing data set. As I mentioned, I am left with Case IDs that have a High flanked by two lows. I am also left with Case IDs that have Highs and Lows but no actual Highs that have the flanking. I want to create a new data set that shows only the records where the flanking occurs. To be more clear, maybe I should have written the sample data as follows: Case ID Date X High Low 0000001 01/01/2010 50 . 1 0000001 02/01/2010 672 1 . 0000001 03/01/2010 50 . 1 0000002 01/01/2011 50 . 1 0000002 02/01/2011 100 1 . 0000002 03/01/2011 50 . 1 0000002 04/01/2011 50 . 1 0000002 05/01/2011 50 . 1 In this example, I want to keep all Case 0000001 records, and only the Case 0000002 records dated 01/01/2011, 02/01/2011, and 03/01/2011 because the remaining records (04/01/2011 & 05/01/2011) do not have the High flanked by two Lows. So the new dataset would look like: Case ID Date X High Low 0000001 01/01/2010 50 . 1 0000001 02/01/2010 672 1 . 0000001 03/01/2010 50 . 1 0000002 01/01/2011 50 . 1 0000002 02/01/2011 100 1 . 0000002 03/01/2011 50 . 1
... View more