Modify outline styles

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Modify outline styles

Post by agibsonsw »

Hello. Excel 2010.

I thought it was possible somehow to modify styles so that they would be applied when using the Subtotals feature, changing them from their default bold and/or italics and hopefully applying to the whole subtotal rows. I think they are called RowLevel_1, RowLevel_2, ColLevel_1, ColLevel_2. Has anyone achieved this, I cannot work out how?
Last edited by agibsonsw on 24 May 2016, 06:09, edited 1 time in total.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Modify outline styles

Post by Rudi »

Personally, I would not use styles. I would recommend using conditional formatting as it would be much more dynamic.

I think the styles you are referring to are Pivot Table styles...?
Image 7.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78668
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Modify outline styles

Post by HansV »

Although Excel will create style such as RowLevel_1 etc. if you tell it to apply styles to a subtotal/outline, it won't automatically apply those styles to other subtotals/outlines in the same workbook, so it appears to be a relatively useless feature.
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Modify outline styles

Post by Rudi »

Hi Andy,

In my years of working with Excel I have never even seen that setting you referenced. (First, apologies - I now see what settings you refer too!)
After experimenting with them, they don't seem to do much at all though (as Hans mentions). I will stick to my advice to use C/F. :smile:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Modify outline styles

Post by agibsonsw »

Thank you both. Yes, I recall trying and failing before to get it to work. I attempted to first create styles of those names, and use Outline Settings to Apply Styles but it doesn't work.

Conditional Formatting would be a good, dynamic, solution. For the moment I've gone with a macro to collapse and format the outline:

Code: Select all

Sub Macro4()
    Application.ScreenUpdating = False
    ActiveSheet.Outline.ShowLevels RowLevels:=2
    Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Font.Bold = True
    'change the header row if necessary
    Range(Range("A1"), Range("A1").End(xlToRight)).Font.Italic = True
    ActiveSheet.Outline.ShowLevels RowLevels:=3
End Sub
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.