Dynamic Charting using a Pivot Table and Range Names

Cooperx5

New Member
Joined
Jan 29, 2015
Messages
3
I tried to follow Jon Peltier’s April 24, 2008 post concerning a Dynamic Chart using Pivot Table and Range Names to create a 60-week Dynamic Rolling Chart. The chart generated fine and adds new data but how do I get it to capture only the last 60 weeks?
Information:
• OS: Windows 7 Enterprise with Service pack 1
• Product: EXCEL 2010

Spreadsheet:
• Testbed All RMA.xlsx (File name)
• RMAs (source tab)
• PTYearWeek (Pivot tab)
Locations:
Range Name Function Description
PTIdCount =COUNTA(‘RMA’!$A:$A) Counts the number of rows in the raw data table
PTData =OFFSET(‘RMAs!$A$1,-60,0,59 + ‘RMAs’!PTIdCount,1) Looks at the label of the first row of data in the raw data table, looks at the last 60 rows; should return last 59
PTPeriod =’PTYearWeek’!$A$4 Looks at the first column label of the Pivot Table (the anchor)
PTBill =’PTYearWeek’!$B$4 Looks at the first category to be charted
PTUnbill =’PTYearWeek’!$C$4 Looks at the second category to be charted
PTTotal =’PTYearWeek’!$D$4 Looks at the third category to be charted (unused)
PTCategories =OFFSET(‘Testbed All RMA.xlsx’!PTPeriod,-60,0,59,
’Testbed All RMA.xlsx’!PTIdCount) Looks at label of the Pivot Table (PT), goes to the bottom of the table, and returns the last 60 records.
PTValues1 =OFFSET(‘Testbed All RMA.xlsx’!PTBill,-60,0,59,
'Testbed All RMA.xlsx'!PTIdCount) Looks at the 1st category column in the PT, goes to the bottom of the table; returns last 60 records (PTBill)
PTValues =OFFSET('Testbed All RMA.xlsx'!PTUnbill,-60,0,59,
'Testbed All RMA.xlsx'!PTIdCount) Looks at the 2nd category column in the PT, goes to the bottom of the table; returns last 60 records (PTUnbill)
 

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,256
Messages
6,123,915
Members
449,132
Latest member
Rosie14

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