Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a master budget workbook from which I am copying different ranges
from different worksheets to the corresponding ranges and worksheets in identically built branch budget workbooks. I want to do this automatically for each of the 20 Branch Budget Workbooks, without having to enter the names of the Branch Budget Workbooks each time to open them, and keep them activated until the steps 1 and 2 below are completed for each branch. How do I code this? The steps are as follows:- 1. Open Master Budget Workbook 2. Select Worksheet, Range and Copy Open Branch Budget Workbook 1 Select Worksheet, Range and Paste 3. Activate Master Budget Workbook Select Worksheet, Range and Copy Activate Branch Budget Workbook 1 Select Worksheet, Range and Paste Close and save Branch Budget Workbook 1 4. Activate Master Budget Workbook Repeat steps 2 and 3 for each of the remaining 19 Branch Budget Workbooks 5. Close Master Budget Workbook Thanks for your help, Patrick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To get your code for just one iteration you should record a macro as you
perform the task manually. Then, to iterate, you need to come up with some way of telling Excel what files to open, either by telling it to take all the files from a particular directory (maybe with a wildcard filter too), hardcode the actual filenames or maybe only those workbooks with a certain value in the Workbook properties. If you post the code you have so far that would help. Patrick Young wrote: I have a master budget workbook from which I am copying different ranges from different worksheets to the corresponding ranges and worksheets in identically built branch budget workbooks. I want to do this automatically for each of the 20 Branch Budget Workbooks, without having to enter the names of the Branch Budget Workbooks each time to open them, and keep them activated until the steps 1 and 2 below are completed for each branch. How do I code this? The steps are as follows:- 1. Open Master Budget Workbook 2. Select Worksheet, Range and Copy Open Branch Budget Workbook 1 Select Worksheet, Range and Paste 3. Activate Master Budget Workbook Select Worksheet, Range and Copy Activate Branch Budget Workbook 1 Select Worksheet, Range and Paste Close and save Branch Budget Workbook 1 4. Activate Master Budget Workbook Repeat steps 2 and 3 for each of the remaining 19 Branch Budget Workbooks 5. Close Master Budget Workbook Thanks for your help, Patrick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protection de-activating tab-naming code | Excel Worksheet Functions | |||
Working within a workbook without activating it? | Excel Programming | |||
Open workbook without activating it | Excel Programming | |||
Activating workbook with variable Name | Excel Programming | |||
Activating a workbook help | Excel Programming |