I have a balanced (no gaps or blanks) data that looks like this:
year var1 var2
2000 1 8
2001 2 9
2003 3 10
2004 4 11
2005 5 12
2006 6 13
I am trying to arrange the data in such a way that var2 column, from row 2 onwards, is pasted in 21st row, column D. I then want var3 pasted in column D after the var2. I want to repeat this for 242 variables. I also want the year values to repeat. Finally, my data should look something like this (I have done the exercise for the var2 only):
year var1
2000 1
2001 2
2002 3
2003 4
2004 5
2005 6
2000 8
2001 9
2002 10
2003 11
2004 12
2005 13
I have tried using macros but got nothing but errors. The problem lies in identifying where the last filled row and then pasting the remaining data below it and then looping this over. I can understand and implement python code as well, if the solution is in pyhton.