complex merging

I have created a master file that is of different layout (i.e it contains more number of columns and more no. of rows but in a transposed way.) I want to merge my excel files into this master file provided certain conditions are fulfilled:
My files have certain data of different companies corresponding to different years ( years in columns and variables in rows )so I have created a master file (with years in rows and the variables in columns) from the earliest year to the latest year. Now I want that the data in the excel files gets copied into the master file according to the year (I.e correct data corresponding to the relevant year).Also I want that two rows should be left empty after each company's data. I don't have time for copying and pasting the data one by one ( the no. Of companies is very large) .is there any other way/code to do this. I hope I have explained my problem
i have attached my execel files sample and tha layout of my master file

AttachmentSize
sample excel file.xlsx8.19 KB
masterfile excel.xlsx8.34 KB
Nick's picture

in VBA, you need to first

in VBA, you need to first align the columns, then copy data across

this can help:
http://excelexperts.com/xla-routines-eesortcols

then this top copy:
http://excelexperts.com/xla-routines-eecopy