Hi Leith,
I am sorry if I have not clarified what I am trying to do.
Here is how my macro works so far.
Steps:
1) Open a "Open file window" where I can select some excel files
2) Open the selected spreadsheets
3) Copy the worksheets from these spreadsheets to my Master workbook (the one that has the macro)
4) Perform some calculations on the data contained in the copied worksheets
5) Create some charts (not embedded) based on the data of the copied worksheets
Now, when I copy the worksheets from the spreadsheets to my Master workbook I add a suffix "_data" to their name.
When I create the chart sheets I add an additional suffix to the worksheet's name, "_chart". Therefore I end up with (for example) a list like this:
Sheet1_data
Sheet2_data
Sheet3_data
Sheet1_data_chart
Sheet2_data_chart
Sheet3_data_chart
Macro_worksheet
What I want to achieve is when I create the chart sheets, instead of simply adding a suffix "_chart" to the sheet's name after the "_data" bit, to strip the "_data" part from the sheet name and simply get a Sheet1_chart name.
I guess this has to be done by specifying a number of characters to remove from the source worksheet name (i.e sheet1_data) and then add the new suffix, or alternatively replace a specific number of characters (or string) with another one.
I hope this makes it clearer, please let me know if you need more details.
The thread containing the macro can be found here (see last post for the final version)
Regards,
K
Bookmarks