CountIfの使い方が間違っています。
endr = Cells(Rows.Count, 1).End(xlUp).Row
Range(\u0026quot;B4\u0026quot;) = WorksheetFunction.CountIf(\u0026quot;F11:F\u0026quot; \u0026amp; endr, \u0026quot;LH\u0026quot;)
または、
For i = Cells(Rows.Count, 1).End(xlUp).Row To 11 Step -1
cnt = 0
If Cells(i, \u0026quot;F\u0026quot;) = \u0026quot;LH\u0026quot; Then
cnt = cnt + 1
End If
Next i
Range(\u0026quot;B4\u0026quot;) = cnt
上記2つの違いを理解してください。