G
Graham
I am trying to get a cell change event procedure to make a calculation with
the data entered in one cell and place that data into another cell. I am
trying something like the procedure below as an example.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Newrange As Range
Set Newrange = Range("A1")
If Union(Target, Newrange).Address = Newrange.Address Then
Range("B1") = Range("A1") * 2.471
End If
End Sub
The problem is that this works but when I put an entry in cell A1 I must
leave the cell and return to it before the procedure is activated and the
calculation is carried out. Is there a way that the procedure can be
activated whenever the value of A1 is changed. Grateful for any guidance.
Graham Haughs
Turriff, Scotland
the data entered in one cell and place that data into another cell. I am
trying something like the procedure below as an example.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Newrange As Range
Set Newrange = Range("A1")
If Union(Target, Newrange).Address = Newrange.Address Then
Range("B1") = Range("A1") * 2.471
End If
End Sub
The problem is that this works but when I put an entry in cell A1 I must
leave the cell and return to it before the procedure is activated and the
calculation is carried out. Is there a way that the procedure can be
activated whenever the value of A1 is changed. Grateful for any guidance.
Graham Haughs
Turriff, Scotland