VBA select from list copy sheet into new workbook and save then repeat for next item in list

Declamatory

Active Member
Joined
Nov 6, 2014
Messages
319
Hi,

I have a workbook with 3 worksheets. The first (Called "EMT") is a template which holds information in respect of an investment fund (not relevant but it's an EMT template for the new EU MiFID II regulations.)

Sheet 2 (Called "ISINs") has a list of Fund ISIN codes (an ISIN code is a unique alpha numeric identifier for an investment product) in column A then the name of the fund in the corresponding column B.

Sheet 3 (Called "FUND DATA") is a list of funds and the values for a number different fields (such as investment risk type, initial fee etc.) in columns A to BN.

In Sheet 1 - Cell D1 the user can select an ISIN code from a dropdown list. The template is then populated using VLOOKUPS to the data from sheet 3 for the relevant Fund relating to the ISIN code. I've created a macro then then can be run using a button that will copy the template sheet, paste it into a new workbook and save it to a file. the file path is obtained from a cell in sheet 1 that is determined by the ISIN code chosen. The new file is then closed leaving the first workbook open. The next ISIN code can be manually selected and the macro run again. Repeat for all funds in the validation list in sheet 2 named "SELECTION".

To the point:

Is there a way where the VBA code could do the following:

In sheet 1 Select the first item in the list "SELECTON"
Copy sheet 1 into a new workbook
replace formulas with values
Save new workbook using filepath in cell H1
Delete contents in cell H1
Save workbook.
Close workbook

Select next item in list "SELECTION"

repeat for all items in list.

Any guidance you can give me would be gratefully received.

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top