I have a table like this:
I need to create some Sumifs command in VBA to exclude green cells from criteria. I have the excel formula =SUMIFS(D:D;C:C;1) and need to add somehow next condition. In VBA I have:
Sub TotalItems()
Dim sum As Integer
sum = Application.WorksheetFunction.SumIfs(Range("D:D"), Range("C:C"), _
3)
MsgBox sum
End Sub
which returns 10.
I need to count only rows without any border colour in range "A:A". I tried to write the formula like this, but it returns an error:
Application.WorksheetFunction.SumIfs(Range("D:D"), Range("C:C"), 3, Range("A:A").Interior.Color, 0)
Any idea how to solve this?
