Say I have a conditional format which makes a cell green when the value inside it is equal to the value of a cell in another column. Can I count how many cells are green in that column in a formula?
I think you can‘t count, how many cells are affected by a conditional formatting, but you can use the condition itself in a formula as a filter and then count it.
E.g. if your condition is „numer = 3“ then you could make a formula outside the table with
=tablename.filter(number = 3).count()
In your case it should work with columnA = columnB, but I‘m not on a desktop right now to try it.
Thanks for the quick reply! I thought of that but I have multiple different conditions that evalute to a green background on my project. I’ll mark this as solved though cause your answer is effectively it.
If you wanted to make it easier to detect those multiple conditions, you could make a new column that aggregates the filter formulas.
E.g. right now you may have a Conditional Format that looks like this:
Where if a Column has “a” in it, then format it.
Aggregating this would look like:
The template is:
CountIf(thisRow.[Column 1].List(),CurrentValue="a") + CountIf(thisRow.[Column 2].List(),CurrentValue="a")
If I’m having trouble solving something, my general rule is to add a new column to the source table and think how that new column could do what I need it to do. If that doesn’t work I’ll try creating a new table.