Split workbook based on criterion+keeping sheets from original workbook

AureliaT

New Member
Joined
Apr 6, 2017
Messages
1
Hi all,

I am a true newbie on VBA and I would very much appreciate help on the below issue:

I have an initial workbook “Tehnicieni” with 3 sheets as follows:

  • SheetA – containing formulas and charts based on the table from SheetC;
  • SheetB – containing formulas and charts based on the table from SheetC;
  • SheetC – containing a table with raw data and formulas based on this raw data;
In need to obtain the following:

  • Separate workbooks based on a criteria from a column from SheetC (e.g. selection from column 7, which has values such as “Baneasa1”, “Baneasa2”,”Avrig” etc);
  • These workbooks should contain all the 3 sheets. SheetA and SheetB as in the initial workbook, SheetC based on the selection from the specified column;
  • The worksheets from these workbooks need to maintain all the formulas from the sheets from the initial workbook;
  • These workbooks need to be saved-as under criteria used (e.g. “Baneasa1”, “Baneasa2”, “Avrig” etc).
In the end I would have:

  • Initial workbook “Tehnicieni” with 3 worksheets: SheetA and SheetB (both with formulas based on SheetC) and SheetC (with a table with values and formulas; column 7 contains criteria such as “Baneasa1”, “Baneasa2”, “Avrig” etc);
  • New workbook “Baneasa1” with 3 worksheets: SheetA and SheetB (both with formulas based on SheetC) and SheetC (with a table containing values and formulas for the selection of “Baneasa1” in column 7);
  • New workbook “Baneasa2” with 3 worksheets: SheetA and SheetB (both with formulas based on SheetC); SheetC (with a table containing values and formulas for the selection of “Baneasa2” in column 7);
  • New workbook “Avrig” with 3 worksheets: SheetA and SheetB (both with formulas based on SheetC); SheetC (with a table containing values and formulas for the selection of “Avrig” in column 7);
  • New workbook ... (for each criteria from column 7 from SheetC).

Thank you very much,
AureliaT
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,091
Latest member
gaurav_7829

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