Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Create a new workbook for all Unique values and new work sheets tothat new workboks

I'm new to VBA and needs to achieve the following task:

I've got a workbook with one worksheet with more then 1000 rows of
data with 185 columns.
There multiple Territory Reps in column E and one/multiple Retailer on
column B. There are one/multiple retailers for each Territory Rep.

I need to create new workbook for each unique Territory_Rep and one/
multiple worksheets on this new workbook.

Finally I’ll have 5 workbooks for Territory Reps and each workbook
will have multiple worksheets for each Retailer that belongs to the
Territory Rep. Each sheet will have calculated figures that would
derived from column Sales1 and Sales2.

Data looks as bellow:

Category Retailer_No Retailer_Name Status Territory_Rep Sales1
Sales2
Cat1 1 Ret 1 Acti Rep
1 100 300
Cat1 9 Ret 2 Acti Rep
2 300 100
Cat1 7 Ret 3 Acti Rep
1 400 200
Cat1 4 Ret 4 Acti Rep
4 100 100
Cat1 5 Ret 5 Acti Rep
3 200 500
Cat1 10 Ret 10 Acti Rep
3 300 100
Cat1 11 Ret 11 Acti Rep
1 600 200
Cat2 6 Ret 6 Acti Rep
2 800 700
Cat2 2 Ret 7 Acti Rep
5 500 500

Sort the table by Territory Rep as below:

Category Retailer_No Retailer_Name Status Territory_Rep Sales1
Sales2
Cat1 1 Ret 1 Acti Rep
1 100 300
Cat1 7 Ret 3 Acti Rep
1 400 200
Cat1 11 Ret 11 Acti Rep
1 600 200
Cat1 9 Ret 2 Acti Rep
2 300 100
Cat2 6 Ret 6 Acti Rep
2 800 700
Cat1 5 Ret 5 Acti Rep
3 200 500
Cat1 10 Ret 10 Acti Rep
3 300 100
Cat1 4 Ret 4 Acti Rep
4 100 100
Cat2 2 Ret 7 Acti Rep
5 500 500

Then create:
Workbook "Rep 1 13-02-2008.xls"
Worksheets "Ret 1", "Ret 3", and "Ret 11"
On each sheet insert a calculated value from the main sheet
e.g. Sales1 + Sales2

Workbook "Rep 2 13-02-2008.xls"
Worksheets "Ret 2" and "Ret 6"

Workbook "Rep 3 13-02-2008.xls"
Create Worksheets named: "Ret 5" and "Ret 10"

Workbook 4 = "Rep 4 13-02-2008.xls"
Worksheets named: "Ret 4" and "Ret 8"

Workbook 5 = "Rep 3 13-02-2008.xls"
Worksheet named: "Ret 7"


Nazmul

Thanks in advance
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CREATE MULTIPLE WORK SHEETS IN A WORKBOOK excel multiple worksheets Excel Worksheet Functions 1 December 31st 06 11:48 PM
DO I MERGE 24 WORKBOKS INTO 1 WORKBOOK? Jeannine Excel Worksheet Functions 0 September 8th 06 01:22 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
create list of unique values from a column with repeated values? Chad Schaben Excel Worksheet Functions 1 July 8th 05 10:25 PM


All times are GMT +1. The time now is 09:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"