I changed your code into
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iSect As Range, Ccell As Range
Set iSect = Intersect(Target, Range("I11:I110")) 'Target.cells.Count can be > 1 !!
If Not iSect Is Nothing Then
For Each Ccell In iSect
If Ccell = "PC" Then
If Range("L" & Ccell.Row) = "" Then
Range("D3") = Range("D3") + 1
End If
End If
Next
End If
End Sub
Note that this code does not check the previous values in I11:I110
e.g. Select I11:I20. In the formula bar type PC and press CTRL+Enter
D3 will increase by 10
Do the same again and D3 is increased by 10 again.
You need to store the previous value of I11:I110 in an array and check for changes.
Bookmarks