• 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 Team,

I am recahing out to you to see if there is availability to do sum based on Color and annormal criteria . attached is the example for your reference.

Thanks in advance for you help.
Raghava
 

Attachments

  • Sumif color & other Criteria.xlsx
    10.9 KB · Views: 7
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

  • Sumif color & other Criteria.xlsm
    17.7 KB · Views: 6
Back
Top