November 18th, 2009, 1:51 pm
This may get you started.Place this code in a standard module:=============Public r As RangePublic Function MyCalc(i, j)If r Is Nothing Then Set r = Application.ThisCellElse Set r = Union(r, Application.ThisCell)End IfMyCalc = i * jEnd Function============Place the code below in the "ThisWorkbook" modulePrivate Sub Workbook_SheetCalculate(ByVal Sh As Object) Dim c As Range If Not r Is Nothing Then For Each c In r.Cells If c.Value > 0.5 Then c.Interior.ColorIndex = 4 Else c.Interior.ColorIndex = 5 End If Next Set r = Nothing End IfEnd Sub
Last edited by
jpsnj on November 17th, 2009, 11:00 pm, edited 1 time in total.