CUSIP DATADATE FYEAR AT CEQ CSHO PRCC_F EVENT_DATE YEAR 88630 31/10/1989 1989 143.831 110.47 13.218 15.375 25/06/2002 2002 88630 31/10/1990 1990 181.665 134.013 13.289 16.375 25/06/2002 2002 88630 31/10/1991 1991 247.169 158.374 13.429 24.375 25/06/2002 2002 88630 31/10/1992 1992 240.762 182.188 13.61 36.25 25/06/2002 2002 88630 31/10/1993 1993 280.054 220.394 27.697 36.5 25/06/2002 2002 So above is roughly what I'm working with. What is want is to test whether FYEAR = YEAR and if EVENT_DATE < DATADATE (therefore if they are in the same year and the data date is after the event date). If this is the case I want to output the previous years data, which is just the row above after it has been sorted. So output format will be the same. Basically I am trying to cull a data set to only include specific rows and that involves taking the row above if the criteria is met. Hope that helps, and thank you for the reply.
... View more