If you want to count cells in a given range without formulae use this function
Dim c As Range
On Error GoTo CountNoFormula_Error
For Each c In rng
If Not c.HasFormula Then
CountNoFormula = CountNoFormula + 1
End If
Next c
CountNoFormula_CleanUpExit:
Exit Function
CountNoFormula_Error:
CountNoFormula = CVErr(Err.Number)
Resume CountNoFormula_CleanUpExit
End Function
If you want to count cells with formule then just remove then “Not” in front of c.HasFormula