Allow user to be able to create a formula to add/subtract any hig.

G

Guest

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.
 
R

R.VENKATARAMAN

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top