Counting visible cells by conditional formatting fill

pliskers

Active Member
Joined
Sep 26, 2002
Messages
461
Office Version
  1. 2016
Platform
  1. Windows
I have a table with conditional formatting of a few different fill colors. If a slicer is applied that hides some of the rows, is there a way to count the number of visible cells in a column for each of the fill colors used, without having to apply a color filter manually?

Stumped!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If it's conditional formatting, there are some rules you can repeat.

Here is a table with a slicer (I can't put the slicer on xl2bb - but it' works on the "Rate" column. You put in the hider column with the subtotal field that only counts visible rows.
MrExcelPlayground11.xlsx
ABCD
1PersonRatehiderWeight
2John101250
3Fred201150
4Harry101200
5Jamie151175
6Wilson201150
7Susie251110
8Mary101150
9Joe251190
10
11
12All8
13Red1
14Yellow3
15Green4
Sheet4
Cell Formulas
RangeFormula
C2:C9C2=SUBTOTAL(102,B2)
B12B12=SUM(Table1[hider])
B13B13=SUMIFS(Table1[hider],Table1[Weight],">=210")
B14B14=SUMIFS(Table1[hider],Table1[Weight],"<210",Table1[Weight],">=170")
B15B15=SUMIFS(Table1[hider],Table1[Weight],"<170")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:D9Expression=$D2>=210textNO
A2:D9Expression=AND($D2>=170,$D2<210)textNO
A2:D9Expression=$D2<170textNO
 
Upvote 0
That’s a clever solution, but unfortunately there are about 100 conditionally formatted columns, so it would mean doubling the column count to accommodate. I was hoping for a single formula at the top of each column that woukd reference a single cell with the formatting I want to count.

Thanks for the suggestion.
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,753
Members
449,094
Latest member
dsharae57

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