Need help with an Excel Pivot Table and Macro

tmpollard

Board Regular
Joined
Jun 12, 2008
Messages
111
Hello, I really hope someone can help me with this. I have a dataset of thousands of rows from which I created this pivot table. The pivot table is actually only columns A:M, columns N:Q were added by me. I left some formulas in there so you could see what I am doing.

In row 1 where you see 1 through 10 that means the number of shirts that are packaged in the box, problem is that 1-10 might not always be the numbers, sometimes it might be 1-5 or 1-25 so, I guess this is called dynamic.

Row N is an offset number to get me back to row 1

Row O is looking for the number in column P then going up the offset number to get the corresponding number from row 1. If we look at row 3 it means that for item number 102758 that sometimes they are packaged in 4's, 6's, and 7's but 59 boxes were packaged in 6.

This is my goal, from my dataset I have created a macro that creates the pivot table, I would also like to expand the macro to automatically fill in columns O-Q when the macro runs.

Thanks to everyone for looking at this.



Excel Workbook
ABCDEFGHIJKLMNOPQ
1ProductDescription12345678910Grand TotalOffsetStandard Package CountCount ConformanceConformance %
2102795Blue Shirts156*********156-1=OFFSET(A2,N2,(MATCH(P2,A2:L2,0)-1))=MAX(C2:L2)=P2/M2
3102758Green Shirts***2*5927***88-265967%
4102757Yellow Shirts49*********49-3149100%
5102756Orange Shirts24*********24-4124100%
6102755White Shirts5***2**5114173-585170%
7102754Black Shirts8****14377**390-6837797%
Slits per PPK
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,375
Messages
6,124,591
Members
449,174
Latest member
chandan4057

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