Can the last two if statements be combined together?
If the user change c4, i want the value of c39 to change or
If the user change e4, i want the value of e39 to change
Is there a better way??
Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("c4", "e4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Application.EnableAutoComplete = False
End If
If Intersect(Range("c4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Range("c39").Value = Range("c4").Value
End If
If Intersect(Range("e4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Range("e39").Value = Range("e4").Value
End If
End Sub
|