#N/A Errors to 0

M

mikewild2000

Is it possable to change all #N/A errors to 0 globally?

Even by the each cell would be fine.

However, once data (numeric) is inserted the data must show and not th
"0
 
F

Frank Kabel

Hi
not sure this is what you want, but change your formulas in the
specific cells to
=IF(ISNA(your_formula),0,your_formula)

HTH
Frank
 
G

Gord Dibben

To change globally as you requested in first post.

Sub NATrapAdd()
Dim myStr As String
Dim Cel As Range
For Each Cel In Selection
If Cel.HasFormula = True Then
If Not Cel.Formula Like "=IF(ISNA*" Then
myStr = Right(Cel.Formula, Len(Cel.Formula) - 1)
Cel.Value = "=IF(ISNA(" & myStr & "),""""," & myStr & ")"
End If
End If
Next
End Sub

Gord Dibben Excel MVP
 
Top