Sum of Shaded Cells

  • Thread starter Thread starter etennant
  • Start date Start date
E

etennant

I have a worksheet that has some shaded figures and others with n
shading. Is there a way to get Excel to sum only the shaded cells.
The figures are all in the same column.

Thanks,

E
 
One way
Sub countshade()
For Each c In Selection
If c.Interior.ColorIndex > 0 Then mc = mc + 1
Next
MsgBox mc
End Sub
 

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

Back
Top