ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   split results to multiple worksheets (https://www.excelbanter.com/excel-worksheet-functions/21413-split-results-multiple-worksheets.html)

Rich

split results to multiple worksheets
 
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

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

Harlan Grove

Dave Peterson wrote...
I'd steal some code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

....

I know you're speaking colloquially, but equating 'steal' with 'use'
with regard to effectively public domain source code carries
unfortunate overtones.


Dave Peterson

Ok, I'd take that code...

Harlan Grove wrote:

Dave Peterson wrote...
I'd steal some code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

...

I know you're speaking colloquially, but equating 'steal' with 'use'
with regard to effectively public domain source code carries
unfortunate overtones.


--

Dave Peterson


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com