Create new workbooks based on cell content?

TheWennerWoman

Active Member
Joined
Aug 1, 2019
Messages
270
Office Version
  1. 365
Platform
  1. Windows
I've got what is (to me) quite a daunting task although I am sure the gurus here will find this relatively simple.

I have a workbook with two tabs, Sheet1 and Sheet2.

Sheet1 contains nine columns, columns A-G are populated, columns H & I are for user input. Column A is the important one.

(Sorry, I can't get xl2BB to work otherwise I'd have used that)

Code:
PNumber PName CNumber CName ANumber AName Plan
A400000 James C343434 Truss Q456456 Patel Ford
A400009 Price C345578 Jones Q458888 Young Fiat
A400009 Capel C399000 Russi Q458888 Young Fiat

What I would like to do is create a new workbook based on column A. So, in the above example, I would end up with a workbook named A400000 containing one record (and the header row) and a workbook named A400009 containing two records (and the header row).

That's the first part. The second part relates to Sheet2. Sheet2 contains two columns
Code:
PNumber AName
A400000 Smith
A400000 Patel
A400000 Jackson
A400000 Roberts
A400009 Young
A400009 Morris
A400009 Peters

In addition to the first part, I'd like to add into the newly created file (on a new sheet) anything from Sheet2 that relates to the file created. So, the file created earlier named A400000 would have a second sheet containing the four records above (Smith, Patel, Jackson, Roberts) and the file created earlier named A400009 would have a second sheet containing the three records above (Young, Morris, Peters).

Any thoughts greatly appreciated as always.

Thank you for reading.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,106
Messages
6,123,124
Members
449,097
Latest member
mlckr

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