Help with a macro/pivot table

lwilt

Board Regular
Joined
May 16, 2013
Messages
187
I have a file that has 2 parts to it. In the first sheet it has a list of item quantity break codes with the different breaks each code has. Each break corresponds to a different price but that isn't relevant here. The second sheet has a list of data that includes item number, break code, year, qty, and sales.

I am trying to find a way break the data down by year so that 2013 is next to 2014 and so on. Within each year each item number would have the number of orders counted and sales summed based on the items qty that occurred in each order and matched into the quantity break table.

I don't know how to upload a file here but I included a link to another site where I created a thread there and was able to upload the example file.

Can a macro sum multiple things to multiple criteria?

Not sure if a macro or pivot table could do this because there are 190 different qty break codes that each have their own unique set of 7 breaks so it seems to complicated for a pivot table.

Please Help!!!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
let me try to copy it from the example file on the other site where the link is posted in the previous post.

item quantity breaks for quantity ordered in each order example:
Break NumberB1B2B3B4B5B6B7
12112
169123691221
2011512

<colgroup><col><col span="7"></colgroup><tbody>
</tbody>

Example of data
ItemdescBreak Numberorder numberorder dateQtySales
AA1211211211/25/2014214
AA1211211221/26/2014214
AB2611692343/6/2014122000
AB26116966677/5/20151232
AA12112110022/12/20157566
HH774201989/21/20149977
AB261169747474741/1/20142121
HH77420188512/1/20141141
HH774201298/14/20156252
HH774201318/17/20156252

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>



Final should look like
ItemDesc14o break114s break114o break214s break214o break314s break314o break414s break414o break514s break514o break614s break614o break714s break715o break115s break115o break215s break215o break315s break315o break415s break415o break515s break515o break615s break615o break715s break7
AA121 2$28 1$566
AB261 1$121 1$2,000 1$232
HH7741$1411$997 2$504

<colgroup><col><col><col span="2"><col span="10"><col span="10"><col span="4"><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
It would be easiest to use a helper cell to essentially correlate the "Break Number" to the break grouping (B1, B2 etc)
Then organize your Pivot Table with Items in your Rows and Columns by Date(Grouped by Year) and Break grouping.
Set for Tabular mode and No subtotals for Rows or Columns.
 
Upvote 0
The only problem with doing it that way is that there is ~190 different break codes so I would have to make 190 different pivot tables then combine the information back together. Doing that many pivot tables would take way to much time.
 
Upvote 0
The only problem with doing it that way is that there is ~190 different break codes so I would have to make 190 different pivot tables then combine the information back together. Doing that many pivot tables would take way to much time.
1 Pivot Table.... 7 Break Codes x Break Number x Years.

Regardless the correlation between the Break Codes and The Break Number must be made for the analysis you wish to display. The Table that has that would be best if it were transposed for Index(Match method for the lookup.
 
Upvote 0
1 Pivot Table.... 7 Break Codes x Break Number x Years.

Regardless the correlation between the Break Codes and The Break Number must be made for the analysis you wish to display. The Table that has that would be best if it were transposed for Index(Match method for the lookup.

I don't follow your response...how would you put an index match in a pivot table
 
Upvote 0
I don't follow your response...how would you put an index match in a pivot table
It would be in the Source Data/Table.
While you can do some Calculations (Fields and Lables) Lookup functions are not available. (PowerPivot probably could though.)

The data for the organization you want must first be available in the Source Data for the Pivot Table, otherwise you will not be able to accomplish the goal you have stated.
 
Upvote 0
I just did it and it won't work so I have no idea how you think it will sum all the different break codes into one output...
 
Upvote 0

Forum statistics

Threads
1,215,978
Messages
6,128,070
Members
449,418
Latest member
arm56

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top