LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default How do I extend the range of the data used in a PivotTable?

One Option -
On the Pivot Table definition declare the Range as a Name, for the example
I'm providing I call it BudgetData...

Save this little Macro to the Workbook to dynamically count the rows of the
Budget Data that are added during your weekly refresh of the data...

I made some assumptions here, that the raw data for your budget update would
exist in a worksheet "Budget Data" and that the budget data would start at
the top of the worksheet in cell A1...

Sub RowCount()
Dim RowCount As Long

Range("A1").Select
ActiveWorkbook.Names.Add Name:="DataTop", RefersToR1C1:="='Budget
Data'!R1C1"

RowCount = (Selection.CurrentRegion.Rows.Count)
ActiveWorkbook.Names.Add Name:="BudgetData", RefersToR1C1:= _
"='Budget Data'!R1C1:R" & RowCount & "C8"
End Sub

Run the macro each time you refresh the data... You may want to add a
button on an Assumptions page and assign the macro to it...

Hope this helps

--

Joe Mac


"Jaybatz" wrote:

I make weekly budget reports, and I use a PivotTable to get a basic overview.
Now the problem is that as I extract data weekly, it changes and rows are
added to the original data each time. The PivotTable does not recognize this
and only checks the original field range. How do I change the range, without
having to create a new PivotTable every week?

 
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
Cannot extend the range of data I'm trying to prevent duplicates i wintergems Excel Worksheet Functions 2 March 19th 08 07:26 PM
Unchecking "Extend data range formats" is not workingfor row shading PLG Excel Discussion (Misc queries) 1 January 18th 07 03:35 PM
Extend a data range MNicholas New Users to Excel 2 August 22nd 05 09:02 PM
Extend data range format and formulas Larry F Excel Worksheet Functions 4 February 2nd 05 06:46 AM
extend data range formats and formulas Lonnie Setting up and Configuration of Excel 1 December 10th 04 11:33 PM


All times are GMT +1. The time now is 08:39 AM.

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

About Us

"It's about Microsoft Excel"