How do I change the layout of column and row labels?

adewilt

New Member
Joined
Feb 7, 2014
Messages
2
Hi there,

As a newby I managed to change the layout of my Pivot using VBA but I can't seem to find what code to use to change the interior color and font layout of the column / row headers. I guess it's fairly simple but can't find it :-(

This is the code I use for the current layout as in the picture below:

PvtTbl.PivotSelect "Row Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(159, 192, 234)

PvtTbl.PivotSelect "Day[All;Total]", xlDataAndLabel, True
With Selection
.Interior.Color = RGB(200, 240, 250)
.Font.Italic = True
End With

PvtTbl.PivotSelect "Column Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(228, 223, 236)
Selection.Font.Color = RGB(0, 0, 0)
Selection.Font.Bold = True

PvtTbl.PivotSelect "Hour[All]", xlLabelOnly, True
Selection.Interior.Color = RGB(208, 192, 234)

{bad HTML removed by mod}
Any ideas?
 
Last edited by a moderator:
And the missing screenshot:
pivotlayout.png
 
Upvote 0

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