Count Conditional Formatting Automatically

New Contributor

I am trying to get numbers in E3-E5 that correspond to the number of cells from column G, F, and A respectively that are conditionally formatted to the background colors of E3-E5. I have tried several VBA options I came across on other sites and I can't seem to tailor them to both work for my data set and automatically update as the conditional formatting changes the background color.


Edit: Also assume I know nothing about VBA if that is the solution as I will not be able to understand looking at the code what data goes where when I execute the function

4 Replies
best response confirmed by CameronChurch (New Contributor)


Instead of looking at the conditional formatting colors, look at the conditions themselves. No VBA needed. See the attached version.

I see that it works on the version you posted but when I try to copy paste or type it into another worksheet it doesn't work, what am I missing?


You'll have to check the exact rules, and change the formulas accordingly.

Thank you I didn't realize Control Shift Enter was necessary to get the array formula to work