Forum Discussion

JOHN-SMF's avatar
JOHN-SMF
Copper Contributor
Dec 18, 2022

SUM FUNCTION

I'm NEW.

How can I get Excel to only add the cells that have a green fill in a range?

i.e. 

Formula cell is B23. Range is B10:22

 

  • JOHN-SMF 

    The cells contain text so their sum, regardless of color, is 0. Did you want to count the green cells instead of summing them?

     

    Have the cells been colored manually, or as the result of a conditional formatting formula?

    If they have been colored manually, you'd need a custom VBA function - see Color Functions in Excel - or an add-in such as ASAP Utilities (free for home use).

    If you applied conditional formatting, it's easiest to create a formula based on the same criteria as the conditional formatting rule.

Resources