Excel Pivot Table- Row Labels not updating

itzvicc

New Member
Joined
Oct 25, 2006
Messages
12
Hello-

I have created a pivot table. I use a macro button to update the pivot table. It is not picking up all of the row lables (current months). for some reason i can get it to do anything but add all the row lables (months) and hide the blank(s).

' MonthlyPivotTableUpdatePivot3 Macro
' Update the Monthly Summary Pivot Table

' unlock sheets to update table
Sheets("Monthly Summary").Select
ActiveSheet.Unprotect Password:="4321"

' screen updateing
Application.ScreenUpdating = False

' show all months on the pivot table
Sheets("Monthly Summary").Select
ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
With ActiveSheet.PivotTables("PivotTable3").PivotFields("Month/ year")

' remove pivot table blanks
With ActiveSheet.PivotTables("PivotTable3").PivotFields("Month/ year")
.PivotItems("").Visible = False
.PivotItems("(blank)").Visible = False
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
itzvicc,
Not sure what's going on in your code, you have With statements but no End With, so what you've shown here won't run. However, are the Month/ Year values that you are expecting actually listed in the drop down pick list for this pivot field? If so, take a look at the field settings for the Month/ Year field. If the check box at the bottom, "Include new items in manual filter" is unchecked, then you may want to try it with this setting enabled. This way when new data is added to the pivot it will be included in what the pivot reports.
Rick
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top