i experimented with this sub
Public Sub test()
Dim ssum As Single
Dim cell As Range
ssum = 0
For Each cell In Range("c1:c7")
If cell.Font.ColorIndex = 6 Then ssum = ssum + cell
Next
MsgBox ssum
End Sub
may be better solution be available. you can modify to suit you.
BTaylor wrote in message
...
Suggestion:
Allow Excel users to be able to create a formula to add or subtract any
highlighted cell of a certain color.
For example, I would like to be able to add or subtract those cells with a
yellow background color and not include anything else.
|