davrosg
04-02-2016, 09:21 AM
Hi all,
What I'm looking to do is create files based on a master file that has a number of worksheets.
These new files should be named according to what's the name of each worksheet is.
Also I need a number of worksheets in each new file creating, based on the content in the original worksheets.
So Sheet 1 in the master is called "Bristol" and has this information in it:
Name Hours Type Jobs
Paul 40 Temporary Filing
Greg 40 Repetitive Cleaning
Julie 25 Repetitive Correspondence
Edward 30 Temporary Filing
So, the VBA would create a new file called Bristol, and would have the worksheets Paul_40, Greg_40, Julie_25, Edward_30 in it.
I'd also like to paste in a template sheet from another directory (say C:\Desktop\Templates), based on the values in Column C (Type) and the last Column (Jobs).
In the new directory there are template files (named with part of the title string the same as values in Column C e.g. "Temporary - version1"), each with a number of worksheets in it e.g. Filing.
So in the example above, a new File called "Bristol" is created, with sheets Paul_40, Greg_40, Julie_25, Edward_30 in it. Paul_40 has the template Filing sheet from Temporary - version1 workbook pasted into it.
Hope that makes some sense!
Thanks!
What I'm looking to do is create files based on a master file that has a number of worksheets.
These new files should be named according to what's the name of each worksheet is.
Also I need a number of worksheets in each new file creating, based on the content in the original worksheets.
So Sheet 1 in the master is called "Bristol" and has this information in it:
Name Hours Type Jobs
Paul 40 Temporary Filing
Greg 40 Repetitive Cleaning
Julie 25 Repetitive Correspondence
Edward 30 Temporary Filing
So, the VBA would create a new file called Bristol, and would have the worksheets Paul_40, Greg_40, Julie_25, Edward_30 in it.
I'd also like to paste in a template sheet from another directory (say C:\Desktop\Templates), based on the values in Column C (Type) and the last Column (Jobs).
In the new directory there are template files (named with part of the title string the same as values in Column C e.g. "Temporary - version1"), each with a number of worksheets in it e.g. Filing.
So in the example above, a new File called "Bristol" is created, with sheets Paul_40, Greg_40, Julie_25, Edward_30 in it. Paul_40 has the template Filing sheet from Temporary - version1 workbook pasted into it.
Hope that makes some sense!
Thanks!