M
Mitch
I'm wondering how to Add red numbers together in a column and blue numbers in
a column. I've conditionally formatted them based on a text string (CAD/USD)
but the macro I've found isn't working, I believe it's not working because
the cells are conditionally formatted.
Not my code, forget were I got it from.
Function SumColor(rColor As Range, rSumRange As Range)
Dim rCell As Range
Dim iCol As Integer
Dim vResult
iCol = rColor.Interior.ColorIndex
For Each rCell In rSumRange
If rCell.Interior.ColorIndex = iCol Then
vResult = WorksheetFunction.Sum(rCell) + vResult
End If
Next rCell
SumColor = vResult
End Function
a column. I've conditionally formatted them based on a text string (CAD/USD)
but the macro I've found isn't working, I believe it's not working because
the cells are conditionally formatted.
Not my code, forget were I got it from.
Function SumColor(rColor As Range, rSumRange As Range)
Dim rCell As Range
Dim iCol As Integer
Dim vResult
iCol = rColor.Interior.ColorIndex
For Each rCell In rSumRange
If rCell.Interior.ColorIndex = iCol Then
vResult = WorksheetFunction.Sum(rCell) + vResult
End If
Next rCell
SumColor = vResult
End Function