What are the cells in a Pivot Table range?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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"?
 
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
 
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
 
You're welcome. I'm glad you were able to get the result you needed.
 

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

Back
Top