atbarrajas
New Member
- Joined
- Mar 10, 2014
- Messages
- 4
Hi everyone,
So I wrote a short function to sum the values in a defined range only if the text is not black, but the formula is not automatically calculating. I share this sheet with others who won't be willing to force a calculation so it's imperative that it works with as little interference from the user as possible. I've checked my calculation settings, added Application.Volatile and it still isn't working. Any help you all could provide would be greatly appreciated.
Thank you.
So I wrote a short function to sum the values in a defined range only if the text is not black, but the formula is not automatically calculating. I share this sheet with others who won't be willing to force a calculation so it's imperative that it works with as little interference from the user as possible. I've checked my calculation settings, added Application.Volatile and it still isn't working. Any help you all could provide would be greatly appreciated.
Thank you.
Code:
Function SUMGREEN(rng As Range)
Application.Volatile
Dim cell As Range, x As Integer
For Each cell In rng
If cell.Font.Color <> vbBlack Then
SUMGREEN = SUMGREEN + cell.Value
End If
Next cell
End Function