Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default What are the cells in a Pivot Table range?

I have a pivot table where the field button for the data is located in cell
A3. I noticed that when Excel automatically creates a chart along with the
table it says the location is at Range("A3").

How can I through VB find out the cells that are contained in that range so
that I can set the format correctly to either "currency" or "percent" rather
than "general"?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default What are the cells in a Pivot Table range?

You can use the TableRange2 property to get the address (including the
page fields):

ActiveSheet.PivotTables(1).TableRange2.Address

Or use the TableRange1 property to get the address without the page fields:

ActiveSheet.PivotTables(1).TableRange1.Address


Darrell Wesley wrote:
I have a pivot table where the field button for the data is located in cell
A3. I noticed that when Excel automatically creates a chart along with the
table it says the location is at Range("A3").

How can I through VB find out the cells that are contained in that range so
that I can set the format correctly to either "currency" or "percent" rather
than "general"?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default What are the cells in a Pivot Table range?

Thanks Debra,

This didn't eactly give me what I needed but through use of the MID$ and
INSTR functions I was able to get what I needed.

Darrell

"Debra Dalgleish" wrote:

You can use the TableRange2 property to get the address (including the
page fields):

ActiveSheet.PivotTables(1).TableRange2.Address

Or use the TableRange1 property to get the address without the page fields:

ActiveSheet.PivotTables(1).TableRange1.Address


Darrell Wesley wrote:
I have a pivot table where the field button for the data is located in cell
A3. I noticed that when Excel automatically creates a chart along with the
table it says the location is at Range("A3").

How can I through VB find out the cells that are contained in that range so
that I can set the format correctly to either "currency" or "percent" rather
than "general"?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default What are the cells in a Pivot Table range?

You're welcome. I'm glad you were able to get the result you needed.

Darrell Wesley wrote:
Thanks Debra,

This didn't eactly give me what I needed but through use of the MID$ and
INSTR functions I was able to get what I needed.

Darrell

"Debra Dalgleish" wrote:


You can use the TableRange2 property to get the address (including the
page fields):

ActiveSheet.PivotTables(1).TableRange2.Address

Or use the TableRange1 property to get the address without the page fields:

ActiveSheet.PivotTables(1).TableRange1.Address


Darrell Wesley wrote:

I have a pivot table where the field button for the data is located in cell
A3. I noticed that when Excel automatically creates a chart along with the
table it says the location is at Range("A3").

How can I through VB find out the cells that are contained in that range so
that I can set the format correctly to either "currency" or "percent" rather
than "general"?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
Pivot table and value range Nicawette Excel Discussion (Misc queries) 2 December 28th 09 09:09 AM
Copying values from pivot table to cells outside pivot table richzip Excel Discussion (Misc queries) 4 January 16th 08 11:03 PM
Pivot Table Range Scott R Excel Worksheet Functions 1 September 27th 07 06:56 AM
Dynamic Range in a Pivot Table Chris C Excel Discussion (Misc queries) 0 June 27th 06 06:11 PM
Changing Pivot Table Range Rod[_7_] Excel Programming 4 April 10th 04 01:47 AM


All times are GMT +1. The time now is 02:14 AM.

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"