Forum Discussion
daurel67
Jan 25, 2021Copper Contributor
Counting function depending on color
How to count cells according to the color of the numbers in them. Specifically those that contain black numbers. Possibly only from colorless cells.
Abiola1
Jan 25, 2021MVP
- daurel67Jan 25, 2021Copper ContributorNot by the color of the cells but by the color of the numbers. 😞
- JMB17Jan 26, 2021Bronze Contributor
Use option 24 for the get.cell method in the youtube video. However, note that changing the font color will most likely not trigger any excel events that are practical to use to trigger the worksheet to recalculate/update, so your total may not update right away (but you can force the worksheet to calculate).
https://www.mrexcel.com/board/threads/info-only-get-cell-arguments.20611/
If possible, I would suggest making some rules for how the cell fonts should be colored and using those in conditional formats. Then, use the same logic/rules in a countif(s) formula.
- NikolinoDEJan 25, 2021Platinum Contributor
Here is a small example with red numbers
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
- daurel67Jan 26, 2021Copper ContributorWhen I change the color of the number it no longer makes the addition.
And anyway, I need to count them, not gather them.