I was working with this issue and found tht if i Change
Target.FormulaHidden = True TO
Range(Target.MergeArea.Address).FormulaHidden = True ,
works fine if i use backspace to delete the contents. but this vl
show error msg if i use Delete key to delete the cell contents.
Here is the code,
Private Sub Changed(ByVal Target As Range, Optional what As String)
Dim rowOffset As Integer
If IsEmpty(Cells(Target.Row, Target.Column)) Then
If (what <> "") Then
Select Case what
Case "Add"
Target.Formula = "=A+B"
rowOffset = 22
Case "Sub"
Target.Formula = "=C-D"
rowOffset = 23
End Select
Else
If ((Target.Row - 1) Mod (Max + Max + 1) < AddAcc + 2) Then
Target.Formula = "=A+B"
Else
Target.Formula = "=C-D"
End If
rowOffset = 0
End If
Target.Font.Italic = True
Target.Font.Bold = False
Target.FormulaHidden = True 'this line shows the error.
Target.Offset(-1, 0).Select
Else
'Selecting next cell down
Target.Offset(1, 0).Select
End If
End Sub