View Single Post
  #1   Report Post  
Patrice Stewart
 
Posts: n/a
Default VBA Formula Fails to Execute

The procedure below increments a counter (StatusCount) based on the value
contained in range cells. The procedure executes properly when the first
range cell value is changed but will not automatically execute again.

Any assistance would be appreciated.


Function StatusCount(Status)
For Each cell In Worksheets("Sheet1").range("ILStatusRange").Cells
If cell.Value = Status Then
StatusCount = StatusCount + 1
End If
Next
End Function

Function is shown in cell as: =StatusCount("O") where "O" is one of the
six values that occur in the range.