Default formal if no data.
Hi
I want to have a default formal in a cell, if the user of the sheets enter data is there, if he then again deletes the data, the formal reappear.
e.g.
A1. – Formal ”=b1+c1”
User enter 5,
User deletes the data, and then the formal is there again.
If I understand this
If I understand this correctly then enter the following subroutine in the code module for the worksheet :-
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value = "" Then
Range("A1").FormulaR1C1 = "=RC[1]+RC[2]"
Range("A1").NumberFormat = "##.00"
End If
End Sub
Then change the format to the required style (I'm not sure what formal is.)