#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Pivot Table


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

Thanks


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=562856

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Pivot Table

You can use the offset function to accomplish this. There is a lot of good
help on this throughout the discussion group and on Debras 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.


"LB79" wrote:


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

Thanks


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=562856


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Pivot Table

Sorry, the full link to get to the correct page
is:http://www.contextures.com/xlNames01.html

"MarkM" wrote:

You can use the offset function to accomplish this. There is a lot of good
help on this throughout the discussion group and on Debras 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.


"LB79" wrote:


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

Thanks


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=562856


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Pivot Table


Thanks for that formular.
Do you know if there is a way to do it in VBA?


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=562856

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Pivot Table

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.

"LB79" wrote:


Thanks for that formular.
Do you know if there is a way to do it in VBA?


--
LB79
------------------------------------------------------------------------
LB79's Profile: http://www.excelforum.com/member.php...o&userid=12156
View this thread: http://www.excelforum.com/showthread...hreadid=562856


Reply
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
Derived Columns in Pivot Table sa02000 Excel Discussion (Misc queries) 1 February 8th 06 07:18 PM
Linking to a pivot table from a formatted invoice Spaceman Spiff Links and Linking in Excel 1 January 1st 06 10:02 PM
Using a Pivot Table Calculated Field to get a Unique Count Mike Struckman Excel Worksheet Functions 1 November 22nd 05 05:32 PM
Pivot -- want to use Max and Sum in same table Dave Excel Worksheet Functions 1 July 13th 05 04:37 AM
how to delete/clean out the row list in pivot table john² Excel Worksheet Functions 1 May 26th 05 04:56 AM


All times are GMT +1. The time now is 09:51 PM.

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

About Us

"It's about Microsoft Excel"