Y
yh73090
Here is the formula and it is not doing what I want and also is the cod
for the "CellCol" in my formula.
=sumcellcol($I$11:$I$22,B11:B22)
What I need is for my formula to look at column "I" if the cell i
filled with color fill #43 then on the same row sum the amount i
column "B".
I also need to have the code checked.
Function SumCellCol(rng As Range, rng2 As Range) As Double
Dim Sumcell As Range
Dim dSum As Double
Application.Volatile True
dSum = 0
For Each Sumcell In rng2
If Sumcell.Interior.ColorIndex = 43 Then
dSum = dSum + Sumcell.Offset(0, -1).Value
End If
Next
SumCellCol = dSum
End Function
Appreciate all assisstance,
Y
for the "CellCol" in my formula.
=sumcellcol($I$11:$I$22,B11:B22)
What I need is for my formula to look at column "I" if the cell i
filled with color fill #43 then on the same row sum the amount i
column "B".
I also need to have the code checked.
Function SumCellCol(rng As Range, rng2 As Range) As Double
Dim Sumcell As Range
Dim dSum As Double
Application.Volatile True
dSum = 0
For Each Sumcell In rng2
If Sumcell.Interior.ColorIndex = 43 Then
dSum = dSum + Sumcell.Offset(0, -1).Value
End If
Next
SumCellCol = dSum
End Function
Appreciate all assisstance,
Y