I have to columns with data: one with a company name, the other with a date. I need to create a third column in which the relative previous date appears, which is quite simple. However, the number of observations per company is inconsistent; therefore I cannot simply copy and move the date range.
Therefore, I need a macro which can do this for the 20,000+ rows of data I have, but this is beyond my coding abilities. Please help!
The data looks like this, and I basically need to create the new column:
Existing data New column
Company Date Previous Date
A 05/2003
A 09/2003 05/2003
B 08/1996
B 10/1996 08/1996
B 09/1997 10/1996
B 09/1998 09/1997
B 09/1999 09/1998
C 08/2000
C 12/2000 08/2000
C 12/2001 12/2000
C 12/2002 12/2001
C 12/2003 12/2002
C 12/2004 12/2003
D 08/1998
D 05/2000 08/1998
There is an example attached as well.
Thank you so much for your help!!!
Leon
Bookmarks