Split a worksheet into multiple worksheets of the same Excel file

S

shree

Hi,

I'm looking for an example of how to split an excel worksheet into
multiple worksheet based on value in a specified column. This is
illustrated through the following example. Suppose I have an input
file that looks like this. I want to split it into multiple
worksheets all contained in the same excel file such that there is one
sheet per value in the 2nd column. Any help pointers would be greatly
appreciated.

Another feature - this is nice to have..but not essential..is, I would
like to color code data lines based on values in 3rd column. If the
value is 1, the text in those data lines in the resulting worksheet
would be red, if its 2 - those lines would be green, 3 would be blue.

Thank you,
Shree

Input File consisting of 3 columns (Name, Functional Area, Code)
===========
Sheet 1 (overall list of records)

Name Functional Area Code
name1 Engineering 1
name2 Sales 2
name3 Manufacturing 1
name4 Engineering 3
name5 Sales 4


Output File
===========
Sheet 1 - same as the Input File
Subsequent sheets - one per Functional area
Hence, from the above example

Sheet 2 (Engineering)
Name Functional Area Code
name1 Engineering 1
name4 Engineering 3

Sheet 3 (Sales)
Name Functional Area Code
name2 Sales 2
name5 Sales 4

Sheet 3 (Manufacturing)
Name Functional Area Code
name3 Manufacturing 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top