Hi people,
i have a VBA script inside a Module
Function SumColor(rColor As Range, rSumRange As Range) Dim rCell As Range Dim iCol As Integer Dim vResult Application.Volatile 'iCol = rColor.Interior.ColorIndex iCol = rColor.Font.Color For Each rCell In rSumRange 'If rCell.Interior.ColorIndex = iCol Then If rCell.Font.Color = iCol Then vResult = WorksheetFunction.Sum(rCell) + vResult End If Next rCell SumColor = vResult End Function
how can simply sum cell if they are the same font.color that a reference cell
but when i'm changing a cell the VBA dont auto-update the result and i have to push F9 to make it happen...
so is there anyway to auto refresh the vba (on timer or on mouse event (click) )
thx a lot people.