Alternative based purely on example file (assuming formulae in say A1 onwards):
Public Sub AddHandler()
Dim rngFormulae As Range, rngCell As Range, strFormula As String
On Error GoTo NoData
Set rngFormulae = Range(Cells(1, "A"), Cells(Rows.Count, "A").End(xlUp)).SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
For Each rngCell In rngFormulae.Cells
strFormula = Mid(rngCell.Formula, 2, Len(rngCell.Formula) - 1)
If Left(strFormula, 2) <> "IF" Then
rngCell.Formula = "=IF(ISERROR(" & strFormula & "),""""," & strFormula & ")"
End If
Next rngCell
ExitPoint:
Set rngFormulae = Nothing
Exit Sub
NoData:
MsgBox "No Formulae to Adjust", vbInformation, "No Data"
Resume ExitPoint
End Sub
Change ranges to suit...
Bookmarks