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)
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)