I'd steal some code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html
Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb
Her code creates a new sheet in the existing workbook, but it shouldn't be too
hard to modify it to create a new workbook.
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
Rich wrote:
I have a workbook which is a list of sales transactions. Column A is a
unique customer reference number which identifies the customer. Each
customer has anything from 1 to hundreds of transactions.
I'm trying to write a macro to export all transactions for each customer,
into a new workbook for each unique customer number, so if I run the macro
on my original workbook with 50 customers purchases, I get 50 workbooks each
with an individual customers purchase history...
I don't really know where to start. Help gratefully recieved.
Rich
--
Dave Peterson