Hi all, I have a workbook with two sheets. One sheet is my data. the other is a template. I am wanting to use VBA to copy my template sheet to a new sheet then populate the named ranges with the data from my data sheet. My data sheet has headers and I have named the ranges on the template identical to the column headings on the data sheet.
I think all the code needs to do is:
1. copy the template sheet to a new sheet.
2. beginning on data sheet A2, copy the value in A2 and paste that value on the newly created "copy" of the template. The code should paste values only into the named range which matches the column heading, A1.
3. after doing that the code should do the exact same thing for each column on Row 2 A:Q....this is the first loop.
4. after completing row 2 the code should go to row 3..then 4...and so on until the last row which has a value in Column A....this would be the second loop..
I dont think this code is too hard, but my VBA is basic and a loop inside a loop will probably throw me off. Hope someone can assist.
I think all the code needs to do is:
1. copy the template sheet to a new sheet.
2. beginning on data sheet A2, copy the value in A2 and paste that value on the newly created "copy" of the template. The code should paste values only into the named range which matches the column heading, A1.
3. after doing that the code should do the exact same thing for each column on Row 2 A:Q....this is the first loop.
4. after completing row 2 the code should go to row 3..then 4...and so on until the last row which has a value in Column A....this would be the second loop..
I dont think this code is too hard, but my VBA is basic and a loop inside a loop will probably throw me off. Hope someone can assist.