Pivot Table

L

LB79

Hi - does anyone know a piece of code that will change the range m
pivot table reads from?

Thank
 
G

Guest

You can use the offset function to accomplish this. There is a lot of good
help on this throughout the discussion group and on Debra’s site
http://www.contextures.com (where I first learned about it)

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

-The COUNTA(Sheet1!$A:$A) will adjust the number of rows for the table as
new data is added.
- You can change the 2 to the number of columns in your pivot table source
data. For example if your data had 15 columns in it then change the 2 to 15.

Optionally, if the number of columns will also change then change the 2 to
this COUNTA(Sheet1!$1:$1).

Hope this helps.
 
G

Guest

I am sure there is, I don't know much about VBA. I have just started to
learn a little bit about VBA myself. You may want to try posting this in the
programming group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top