How to count number of #N/A error in Excel?

Number of occurrence of #N/A error in a column can be found by using the formula: Countif(<column>,”#N/A”)

Consider, You havefew vlookup formula in column D.

Out of it, few resulted in #N/A error. To get the count of this error in column D use the below formula or macro code.

'-Use this formula in any Excel cell
=Countif("D:D","#N/A")

'-Use this command in VBA Code
MsgBox Application.CountIf(Cells, "#N/A")

Both the above function gives the same result.

Not only count, You can also delete or highlight all the #N/A errors using the VBA code in this page.