Dynamic Formatting with Grouping

AllisterB

Board Regular
Joined
Feb 22, 2019
Messages
120
Office Version
  1. 365
Platform
  1. Windows
I have a total cell that is formatted as bold. When I use grouping and hide the rows the total is summing I want the Total to be unbold.

Please see attached.

I thought I might be able to use Conditional Formatting but did not know how to reference the Grouping level in the Conditional Formatting formula.

I would appreciate any help you may have.

Allister

Book2.xlsx
DEFG
7Before
8
9apple10
10Pear20
11Orange30
12banana40
13
14100
15
16
17After
18
24100
25
Sheet1
Cell Formulas
RangeFormula
G14,G24G14=SUBTOTAL(9,G9:G13)
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
See if this would be sufficient.
Remove the bold from G14
Apply this Conditional Formatting to G14, with Bold Font as the CF formatting.

It would fail if the total of G9:G13 is in fact 0. If that could be a problem for you post back for a work-around.

20 08 10.xlsm
G
910
1020
1130
1240
13
14100
Bold or Not
Cell Formulas
RangeFormula
G14G14=SUBTOTAL(9,G9:G13)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G14Expression=SUBTOTAL(9,G9:G13)=SUBTOTAL(109,G9:G13)textNO
 
Upvote 0
a work-around.
I'll post it anyway in case it suits you better.
  • In any vacant column (I used column H) place a 1 (or any number) in one/all/some of the cells in that column that would be hidden by the grouping button.
  • Hide that column manually (I've left is visible for you to see filled)
  • Change the CF rule to this

20 08 10.xlsm
GH
8
901
1001
1101
1201
131
140
15
Bold or Not (2)
Cell Formulas
RangeFormula
G14G14=SUBTOTAL(9,G9:G13)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G14Expression=SUBTOTAL(102,H9:H13)textNO



.. and when the rows are hidden by the grouping button:

20 08 10.xlsm
GH
8
140
15
Bold or Not (2)
Cell Formulas
RangeFormula
G14G14=SUBTOTAL(9,G9:G13)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G14Expression=SUBTOTAL(102,H9:H13)textNO
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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