Option Explicit
Sub Worksheet_Change(ByVal Target As Range)
Dim L As Integer
Select Case True
Case Target.Count > 1
Case Intersect(Target, Range("A2:" & LC.Address)) Is Nothing
Case Else
Application.EnableEvents = False
L = Target.Row
Cells(L, "A") = WorksheetFunction.Count(Cells(L, "B"), Cells(L, "E"), Cells(L, "J"), Cells(L, "M"))
Application.EnableEvents = True
End Select
End Sub
Function LC() As Range
With Application.FindFormat
.Clear: .Borders.LineStyle = xlNone
End With
Set LC = Columns("M").Find(What:="", SearchFormat:=True)
If LC Is Nothing _
Then Set LC = UsedRange.SpecialCells(xlLastCell) _
Else Set LC = LC.Offset(-1)
End Function