Format Pivot Table Total Rows using Macro

gizzylover

Board Regular
Joined
Nov 9, 2005
Messages
55
Since the pivot table formats available to me are not desireable, I'd like to create a macro to format the "total" rows on my pivot table to bold and a shaded color.
My logic is this:

If on the pivot table, any row in columns C:E contains the word "total", then format that row (starting with column that has the word total in it) and ending with column N to be bold font text and shaded orange.

Can someone help me figure out how to do this?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
In Excel2010 it's pretty easy and no need for macros!

1) Select a row containing pivot table totals by clicking on that row number (the cursor should change to the right arrow).
2) If you have multiple sub-totals, say, by production facilities and production lines, make sure you select the same type of subtotal by holding Ctrl button and clicking on the second subtotal row. The cursor should remain as the right arrow and row numbers for all of the subtotals of that type will become orange color.
3) Change font type, size, color, highlight, etc. as you normally would. The changes will affect all of the subtotals immediately.
4) If you have multiple subtotals, repeat for the other group(s), giving them different highlights/fonts/whatever.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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