Solved

pivot table range

Posted on 2013-12-16
1
214 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
1 Comment
 
LVL 32

Accepted Solution

by:
Rob Henson earned 500 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel 2010 - Delete Row based on date 8 34
Move data from one sheet to another 11 28
Excel Conditional Statements 11 32
VLOOKUP 6 15
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now