Copy data from datafile to template and save template as new workbook for each row of data

  • HELLO,

    I have a excel data file and excel template. I need to copy a row of data from data file to a template and save that template as row1 value in data file and go to data file and copy the second row data into template and save the template as as row2 value in data file . I need to keep doing this until the last row of data in data file.

    The template rows are fixed and template has two sheets. Only the data file row values keep changing.

    I need to first copy A2 value from data file to Template(Sheet1) AB2 cell.

    I need to copy a range of C2 TO L2 value from data file to Template(Sheet2)of range Aj11 to AS11.

    The cells highlighted in bold of template are not going to change.

    With record macro i was able to create a file with one row value how do i change the below macro to loop through each row of data file and create new files.

    Any help would be much appreciated. I have uploaded data and template file

  • Your post does not comply with our Forum RULES. Use code tags around code.

    Posting code between


    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window.

    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!