Macro to split the workbook in different worksheets

 Blocked Profile -
Need a macro for Excel that will copy rows from my spreadsheet into a new one if it meets certain criteria.

In the example below, I want to copy all of the rows that have "ab" in the second column to a new spreadsheet. I then want to repeat the process for the other values that appear in that column, therefore splitting the data into several different worksheet and worksheet name should be "ab" for first sheet and then so on.

GP BR CUST_NO NAME day mo year
I1 01 999999 SMITH 00 08 09
I1 ab 999999 SMITH 04 08 09
I1 cd 999999 SMITH 04 10 09
I1 01 999999 SMITH 04 01 10
I1 02 999999 SMITH 27 02 10
I1 01 999999 SMITH 27 02 10
I1 cd 999999 SMITH 02 03 10
I1 cd 999999 SMITH 04 03 10
I1 cd 999999 SMITH 30 07 09
I1 ab 999999 SMITH 30 07 09
I1 02 999999 SMITH 30 07 09

1 reply

Cool, I will get on this one, while you start parsing my TEXT file, as we both NEED.

So, I need to parse apart the following data structure, and if it doesn't match on the first qualified data field, then we fail over to the next, and the next until we get a does that sound?

We all need something!

It helps when you bring something for us to work with. I will not work on such a task, as I have WASTED MY TIME producing products, only to have others realize that THEY have no idea of what THEY want for MY process to produce. So, please understand, we do NOT provide turn key solutions. If YOU are stuck with coding, WE can help.

Have even recorded a MACRO and seen what happens when you record the steps you are trying to perform? They are very easily initialized with a variable!

It's kind of fun to do the impossible! -Walter Elias Disney