• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sumifs with Color and statement as criteria

Hi:

Use the following UDF

Code:
Function SumColor(CColor As Range, rng As Range)
Application.Volatile

Dim CellSum&

CIndex% = CColor.Interior.ColorIndex

For Each cl In rng
  If cl.Interior.ColorIndex = CIndex Then
    CellSum = WorksheetFunction.Sum(cl, CellSum)
  End If
Next cl

SumColor = CellSum

End Function

Thanks
 

Attachments

Back
Top