Both of these routines work when run manually, the first by selecting a range initially.
I see no reason why they would work differently from a short cut key. Unless you have changed which macro the short cut key links to, you may well be running your original code.
The second one definitely works eith Ctrl-Shift-E
Sub InsertIfError_TMS_Select()
'
Dim c As Range
For Each c In Selection
c.Formula = _
"=iferror(" & Right(c.Formula, Len(c.Formula) - 1) & ", 0 )"
Next c
End Sub
Sub InsertIfError_TMS_Range()
'
Dim c As Range
For Each c In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
c.Formula = _
"=iferror(" & Right(c.Formula, Len(c.Formula) - 1) & ", 0 )"
Next c
End Sub
Bookmarks