View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Polo78 Lacoste Polo78 Lacoste is offline
external usenet poster
 
Posts: 12
Default Copy/Paste Template to New Workbook



I have a template with two worksheets, sheet1 with the actual template
which has about 20 vlookups and other formulas. Sheet2 contains the
range for the vlookups.

I need help to do a repetitive task of saving one template per file per
name as its own workbook. Sheet2 contains over 300 rows and each row
starting on A2 cell has a name of the file along with the corresponding
vlookup on sheet1 on cell D5.

Basically, the steps I manually do, every month.
1. Open the template above, and on Sheet1, their is a formula on D5
which has
=INDIRECT("Sheet2!$A2") as that is my first row of data.
All other formulas and vlookups depend on the data I changed in
Sheet1!$D5.
2. Copy/Paste values removing all formulas
3. Save it to the name of D5 cell on as a new workbook.
4. I then go back to D5 and change $A2 to $A3 and repeat steps 1 to 3,
etc until I reach end of my rows in Sheet2.

Any hard coding will be greatly appeciated.

Thank you.

Beginner in VBA

*** Sent via Developersdex http://www.developersdex.com ***