Excel 2002 - How do I split a .xls file into multiple files based on data in a column

N

nebuul

I am working on a huge spreadsheet that logs thousands of transactions
from dozens of customers. What I need to be able to do quickly break
up that spreadsheet by customer code (column C) and save a file for
every customer (along with the header) as a file named "(column C) -
(column B) - (date).xls" I want it to save every file in one pass, and
each file should include every column from A through P for the rows
included.

For example, in column C rows 2-20 the value is CAT004, 21-24 is
BOB002, and 25-200 is JIL000. There should be 3 output files which
should be named:

CAT004 - Caterpillar - 8-1-2006.xls
BOB002 - Bob Sykes - 8-1-2006.xls
JIL000 - Jilliard Wallace - 8-1-2006.xls

Does anyone have a good solution?


Thank you.
 
N

nebuul

Sorry, one other thing. Is there any way to change or designate
formatting with this method? Optimally, I would prefer to keep the
formatting from the original document. If that isn't possible, I would
like to remove word wrap and auto-fit the width of the columns to the
text inside. The code you showed me is already a huge help, but this
would would make it even moreso.

Thank you!
 

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