In the data set below, I got the oldest year and the most recent then force each unique Planname to have each of the year in between.
With the example below, the year range is betwee 2001 - 2009.
Generic 1 has everything, but Fake 2 is missing 2009 and Whatever is 2003 and 2009
My goal is to identify the missing year for each name and insert it in. Would like to enter a 0 value for score and make sure the Planname is fill out with the right name.
I have attempted by using a while loop and a for loop, but unsuccessful.
Your help is greatly appreciated.
Planname FY Score
Generic 1 2001 -6.36
Generic 1 2002 -9.29
Generic 1 2003 16.48
Generic 1 2004 10.06
Generic 1 2005 10.98
Generic 1 2006 8.37
Generic 1 2007 17.92
Generic 1 2008 -15.21
Generic 1 2009 -10.03
Fake 2 2001 -6.05
Fake 2 2002 -7.81
Fake 2 2003 15.98
Fake 2 2004 10.71
Fake 2 2005 11.26
Fake 2 2006 8.82
Fake 2 2007 17.46
Fake 2 2008 12
Whatever 2001 -6.05
Whatever 2002 -7.81
Whatever 2004 10.71
Whatever 2005 11.26
Whatever 2006 8.82
Whatever 2007 17.46
Whatever 2008 12
Final result
Planname FY Score
Generic 1 2001 -6.36
Generic 1 2002 -9.29
Generic 1 2003 16.48
Generic 1 2004 10.06
Generic 1 2005 10.98
Generic 1 2006 8.37
Generic 1 2007 17.92
Generic 1 2008 -15.21
Generic 1 2009 -10.03
Fake 2 2001 -6.05
Fake 2 200 -7. 81
Fake 2 2003 15.98
Fake 2 2004 10.71
Fake 2 2005 11.26
Fake 2 2006 8.82
Fake 2 2007 17.46
Fake 2 2008 12
Fake 2 2009 0
Whatever 2001 -6.05
Whatever 2002 -7.81
Whatever 2003 0
Whatever 2004 10.71
Whatever 2005 11.26
Whatever 2006 8.82
Whatever 2007 17.46
Whatever 2008 12
Whatever 2009 0
Bookmarks