?
Solved

pivot table range

Posted on 2013-12-16
1
Medium Priority
?
223 Views
Last Modified: 2013-12-16
is there a way to make a pivot either i) remain static with a range or ii) ensure it always grabs all the data when the pivot is refreshed in a mcaro with 'Activeworkbook.RefreshAll'

i.e. If I have 5000 rows today and my pivot range is Sheet1!$A$5:$T$5000 it will work.

if tomorrow the numberof rows has gone to say 4500 the range changes to 'Sheet1!$A$5:$T$4500'

if the following day the number of rows increases to 5100 the pivot range stays at 'Sheet1!$A$5:$T$4500' and will return invalid data.

So, I need to always ensure that I pick up all the data if the number of rows goes down or up

Thanks
0
Comment
Question by:Jagwarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 33

Accepted Solution

by:
Rob Henson earned 2000 total points
ID: 39721103
You can set your data range as a Dynamic Range.

In the Range Name Manager create a Range with Workbook scope using the following in the Refers To box:

=OFFSET(Sheet1!$A$1,0,0,COUNTA(Sheet1!$A:$A),COUNTA(Sheet1!$1:1))

This creates a range that is the same height and width as the data in Sheet1, starting at A1.

Then in the Pivot Wizard, use the Named Range as the data source.

Thanks
Rob H
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question