Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default PivotTable using Named Ranges

I am creating a pivottable in excel 2003 using VBA and
wanted it to reference two named ranges. How do you do
that?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default PivotTable using Named Ranges

Turn on the macro recorder and create the pivot table manually, having it
refer to the two named ranges.

When done, turn off the macro recorder.

Look at the recorded code. Make adjustments as appropriate.

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am creating a pivottable in excel 2003 using VBA and
wanted it to reference two named ranges. How do you do
that?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default PivotTable using Named Ranges

In addition to Tom's excellent advice, note that you can create a Pivot
Table from multiple consolidation ranges, but you won't get the same
pivot table layout that you'd get from a single range. There's an
example he

http://www.contextures.com/xlPivot08.html

If possible, store your data in a single range, and you'll have more
flexibility in creating the pivot table.


John wrote:
I am creating a pivottable in excel 2003 using VBA and
wanted it to reference two named ranges. How do you do
that?



--
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
PivotTable - multiple consolidation ranges IgorM Excel Discussion (Misc queries) 1 October 10th 08 04:59 PM
Excel 2007 PivotTable Named Sets as a filter DaBus11 Excel Discussion (Misc queries) 0 July 27th 06 02:47 AM
PivotTable - Multiple Consolidation Ranges Alan Excel Worksheet Functions 1 March 10th 06 01:54 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM


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

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

About Us

"It's about Microsoft Excel"