Hi -
I found the SumIFcolor macro shown below and successfully implemented it on a new sheet referencing existing sheets in my office's network drive. It works fine as long as I don't close the existing sheet(s), at which point I get the #VALUE! error. If I just use SUM for the same range, I don't have this problem. Is it a macro issue? Can I modify the macro to cure it? Fyi, I'm a novice user.
SumIFcolor Macro:
Function SumIFcolor(InCells As Range, ColorIndex As Integer) As Double
SumIFcolor = 0
For Each c In InCells
If c.Interior.ColorIndex = ColorIndex Then
SumIFcolor = SumIFcolor + c.Value
End If
Next c
End Function
Bookmarks