Microsoft Excel - Add color to the row field for each region in a pivot table

Asked By Cherifa Hima on 22-Jun-16 12:36 PM

Hi,


I have a pivot table that shows sales by region, sub region, sales, cost, ... I want to  give each region with all  its sub regions and the numbers the same color.  So basically each region will have its own color including all others columns. I was wondering if we can use VBA. The regular formatting of the pivot table does not allow that and if I do it manually , it will take for ever.


Thanks

Harry Boughen replied to Cherifa Hima on 22-Jun-16 09:54 PM
Hello Cherifa,

It is possible to do conditional formatting of a Pivot Table though there can be some difficulties if you want to change the layout of the table drastically and you lose it if you delete the Pivot Table.

The attached file contains a table that has been formatted this way.  You should be able to look at the Conditional formatting rules and work out what you might need to do in your case.

PivotCondFormat.zip

If you want to use VBA, you could have a read here http://peltiertech.com/pivot-table-conditional-formatting-with-vba/   and this might help you along the way.

Regards

Harry
Cherifa Hima replied to Harry Boughen on 23-Jun-16 09:27 AM
Thanks