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
|