Chart Type changes when updated

SandsB

Well-known Member
Joined
Feb 13, 2007
Messages
731
Office Version
  1. 365
Platform
  1. Windows
I have a pivot table that provides an average number of days for each of 2 fields. I want my chart to show one as a Line and the other as column. When I run a macro that refreshes the data and chart, the one I want to be a line is a column and vice versa. It's an easy manual change but I have to do it every time I update my data. Why is that? There's some crap in here because I created this macro by recording.


Sheets("Len").Select
' With ActiveSheet.PivotTables("PivotTable31").PivotFields("P Date")
' .PivotItems("(blank)").Visible = True
' End With
Range("A6").Select
ActiveSheet.PivotTables("PivotTable31").PivotCache.Refresh
With ActiveSheet.PivotTables("PivotTable31").PivotFields("P Date")
.PivotItems("(blank)").Visible = False
End With
Range("A8").Select
ActiveSheet.PivotTables("PivotTable31").PivotCache.Refresh
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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