View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Yngve Yngve is offline
external usenet poster
 
Posts: 67
Default Sum all cells with interior color...

Hi Ctect

this should work
Sub b()

Dim p As Double
p = 0
For Each cell In Selection
On Error Resume Next
If cell.Interior.ColorIndex = 36 Then
If IsNumeric(cell) Then
p = p + cell.Value
End If


End If


Next cell

end sub

Regards Yngve