I made a short sub for avoiding formula errors in a column. It assumes your cursor is in the header column of the column you want to handle.
But header row and column can be replaced by a hardcoded number you want to use
It basically turns something like
=G2/H2
into
=IFERROR(G2/H2,"")
Private Sub AvoidErrors()
Dim i As Long, Val1 As String, Val2 As String
Dim Lrow As Long, Ccol As Long, Hrow As Integer, L1 As Integer
'add error handling to formula
Hrow = Selection.Row
Ccol = Selection.Column
Lrow = Cells(Rows.Count, Ccol).End(xlUp).Row
For i = Hrow + 1 To Lrow
On Error Resume Next 'Not sure what to do with blank cells so I'm skipping
Val1 = Cells(i, Ccol).Formula
L1 = Len(Val1)
Val2 = "=IfError(" & Right(Val1, L1 - 1) & "," & Chr(34) & Chr(34) & ")"
Cells(i, Ccol).Formula = Val2
Next i
MsgBox "Done"
End Sub
But header row and column can be replaced by a hardcoded number you want to use
It basically turns something like
=G2/H2
into
=IFERROR(G2/H2,"")
Private Sub AvoidErrors()
Dim i As Long, Val1 As String, Val2 As String
Dim Lrow As Long, Ccol As Long, Hrow As Integer, L1 As Integer
'add error handling to formula
Hrow = Selection.Row
Ccol = Selection.Column
Lrow = Cells(Rows.Count, Ccol).End(xlUp).Row
For i = Hrow + 1 To Lrow
On Error Resume Next 'Not sure what to do with blank cells so I'm skipping
Val1 = Cells(i, Ccol).Formula
L1 = Len(Val1)
Val2 = "=IfError(" & Right(Val1, L1 - 1) & "," & Chr(34) & Chr(34) & ")"
Cells(i, Ccol).Formula = Val2
Next i
MsgBox "Done"
End Sub