ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   duplicate spreadsheets with different names (https://www.excelbanter.com/excel-programming/325060-duplicate-spreadsheets-different-names.html)

davegb

duplicate spreadsheets with different names
 
I'm creating spreadsheets for each county in the state (64). I've
created a master spreadsheet, with macros and buttons to make things
easier for state employees. Now, I need to make 63 copies of this
spreadsheet, one for each county, with the county name in a merged cell
in the upper left corner (where A1 would be) of each worksheet,
following other descriptive text. Each spreadsheet will be named by
county and put in a county folder. The merged cell contains cells A1,
A2, A3.

To clarify, I need a macro to create 64 folders, one for each county (I
already know how to do that), then take a standard workbook, or
template, give it the county name along with other descriptive text,
put the county name in following other text in the first cell in each
sheet in the workbook, and place it in the appropriate county folder.

Of course, I'm going to set up and test this on my local hard drive
with about 5 "counties", and after it works there, change the path for
the folders and spreadsheets to go to, the server, and do the actual
creation of the user files there.

Can anyone help me with this? Thanks in advance!


Naomi

duplicate spreadsheets with different names
 
I think your best bet is to set up a gateway file that has all the names of
the counties in a list. Then write some code to create an array from this
list and perform the actions necessary on each item in the array. That way
you have the flexibility to change counties, file paths etc. in the master
file.

"davegb" wrote:

I'm creating spreadsheets for each county in the state (64). I've
created a master spreadsheet, with macros and buttons to make things
easier for state employees. Now, I need to make 63 copies of this
spreadsheet, one for each county, with the county name in a merged cell
in the upper left corner (where A1 would be) of each worksheet,
following other descriptive text. Each spreadsheet will be named by
county and put in a county folder. The merged cell contains cells A1,
A2, A3.

To clarify, I need a macro to create 64 folders, one for each county (I
already know how to do that), then take a standard workbook, or
template, give it the county name along with other descriptive text,
put the county name in following other text in the first cell in each
sheet in the workbook, and place it in the appropriate county folder.

Of course, I'm going to set up and test this on my local hard drive
with about 5 "counties", and after it works there, change the path for
the folders and spreadsheets to go to, the server, and do the actual
creation of the user files there.

Can anyone help me with this? Thanks in advance!




All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com