D
Dale
Excel 2000
I'm new to using VBA with Excel.
What I am trying to do is change the formula in a cell based on which cell
is active (has focus) Such As:
Private Sub Worksheet_Selection Change( byval target as range)
If Target.Address = "$A$1" Then
Range("E1") = (B1+C1)/D1
Elseif Target.Address = "$A$2" Then
Range("E1") = (B2+C2)/D2
End If
The part I'm having problem with is the syntax for the formula:
Range("E1") = (B1+C1)/D1
Any help appreciated!
Dale
I'm new to using VBA with Excel.
What I am trying to do is change the formula in a cell based on which cell
is active (has focus) Such As:
Private Sub Worksheet_Selection Change( byval target as range)
If Target.Address = "$A$1" Then
Range("E1") = (B1+C1)/D1
Elseif Target.Address = "$A$2" Then
Range("E1") = (B2+C2)/D2
End If
The part I'm having problem with is the syntax for the formula:
Range("E1") = (B1+C1)/D1
Any help appreciated!
Dale