Hi all,
I have been working on this problem for a while but cannot find a solution myself. I have a sheet with columns for ID, NAME, YEAR, COUNT, CODE. In the final dataset I need rows for each year from 1995 to 2008 and all the other columns filled in as well (see outcome sheet in the example).
The problem is that for some of the entries in the dataset I only have observations starting from different years e.g. 2000 and for some of the entries one year in the series is missing e.g. 1995, 1996, 1998, 1999, 2000 (see example Sheet1). This means I need a macro to insert rows whenever there is either a year missing in a series or when the series does not cover the years 1995 to 2008. In addition, once the rows are inserted I need the ID, NAME, YEAR, COUNT and CODE data to be filled into the new rows.
I have posted and example workbook where Sheet1 contains the problem data and the outcome sheet contains the desired outcome data. RowInsertExample.xlsx
Thanks a lot for any ideas and help in advance.
ExcelKook
Bookmarks