I am trying to use vba to insert a formula into cell on my Sheet. I believe it can be done with the formula I have below, but unfortunately I do not know how to fix my syntax below.
What's wrong with my FormulaLocal syntax?
The strange thing is that using R.Formula, it works, but the cell gets the error #NAME
Sub InsertIFERROR()
Dim R As Range
Set R = Application.InputBox("Select a range", "Get Range", Type:=8)
R.Select
For Each R In Selection.SpecialCells(xlCellTypeFormulas)
R.FormulaLocal = "=SEERRO(" & Mid(R.FormulaLocal, 2) & ",""-"")"
Next R
End Sub