Forum Discussion
Pau_Me
Sep 19, 2019Copper Contributor
How to count by FONT COLOR in excel when font color depends on a conditional formatting rule?
Hi! I came across to this thread coz i was looking for an answer to my problem. And found this post "sum by color when colors are set by conditional formatting" However, what I want is to count al...
Subodh_Tiwari_sktneer
Sep 19, 2019Silver Contributor
No, that function was not supposed to be used on the Worksheet like a regular function.
AllanDBacon51
Aug 27, 2022Copper Contributor
Would you clarify this statement more clearly as I am not very familiar with VB and am trying to do something similar.
Thanks!
- HansVogelaarAug 27, 2022MVP
The function getCountBasedOnCFFontColor posted by Subodh_Tiwari_sktneer can't be used in a formula in a cell. This is because it refers to the DisplayFormat property of a range; this property doesn't work if used in a cell formula.
The function can only be used in other VBA code, such as the macro CountCellsWithRedFont in the same post.