I am attempting to retrieve the number (count) of "#N/A" and "#Value" cells within a range (EG A1:A100).
So far I have 2 solutions:
- Array formula : "=COUNT(IF(ISERROR(A1:A100), 1, 0))" cntr + shft + entr
the solution works but lags a dynamic element. If it does update, it is slow and late to the party.
- Create a custom formula (nested in a module)
Public Function ErrorArray(Rng As Range)
Dim ErrorCount As Integer
Dim Cell As Range
Application.Volatile
For Each Cell in Rng
If Cell.Errors.Items(xlEvaluateToError) = True Then
ErrorCount = ErrorCount + 1
End If
Next Cell
ErrorArray = ErrorCount
End Function
*Please excuse any errors, it did work so thats not the point.
The issue with this solution is the massive drop in workbook performance. Does anyone else know an efficient and dynamic solution, either formula or code?
