LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Change SourceName on Pivot Table

Hi All,

I have a pivot table, where one of the data source column headers
changes. When this happens, and I go to Refresh my pivot table, that
particular column is removed. After doing some research, it sounds
like I need to change the SourceName on that field to match the source
data column header. I tried the following, but got the error 'Unable
to change the Source Name property of the PivotField Class'. Any
ideas?

Sub test()

Set i = Worksheets("Consolidated").Range("M1") 'the data
source header cell that changes

Worksheets("Summary").PivotTables(1) _
.PivotFields("Category").SourceName = i


End Sub
 
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
Change of table name in access where Excel obtains pivot table inf Andrew Excel Programming 3 July 26th 07 03:06 AM
can i change pivot table to change data jacob22 Excel Discussion (Misc queries) 2 April 11th 07 03:32 PM
Pivot table change selection Bernie Deitrick Excel Programming 0 December 13th 06 04:50 PM
Change Pivot Table Range Pat Garard Excel Programming 2 May 15th 06 02:32 PM
Pivot Table/ % Change Debra Dalgleish Excel Programming 0 February 19th 05 01:27 AM


All times are GMT +1. The time now is 05:08 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"