Hi,
A product can either be for surface use or for subsea use - not both at the same time...
[TABLE="width: 500"]
<tbody>[TR]
[TD]Surface[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Subsea[/TD]
[TD]No[/TD]
[/TR]
</tbody>[/TABLE]
I have made Yes/No selectable from a dropdown.
But...
These two fields (B1 vs B2) must be of opposite values...
Ie.
If I select B1 as Yes, then B2 should change to No - and vice versa.
If I select B2 as Yes, then B1 should change to Yes - and vice versa.
I can't seem to avoid a circular reference - my VBA stops...
The below works fine for one field... But... :-/
Any ideas?
Thanks...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("b2:b2")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If Worksheets(1).Range("B2").Value = "Yes" Then Worksheets(1).Range("B1").Value = "No"
If Worksheets(1).Range("B2").Value = "No" Then Worksheets(1).Range("B1").Value = "Yes"
End If
End Sub
A product can either be for surface use or for subsea use - not both at the same time...
[TABLE="width: 500"]
<tbody>[TR]
[TD]Surface[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]Subsea[/TD]
[TD]No[/TD]
[/TR]
</tbody>[/TABLE]
I have made Yes/No selectable from a dropdown.
But...
These two fields (B1 vs B2) must be of opposite values...
Ie.
If I select B1 as Yes, then B2 should change to No - and vice versa.
If I select B2 as Yes, then B1 should change to Yes - and vice versa.
I can't seem to avoid a circular reference - my VBA stops...
The below works fine for one field... But... :-/
Any ideas?
Thanks...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("b2:b2")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If Worksheets(1).Range("B2").Value = "Yes" Then Worksheets(1).Range("B1").Value = "No"
If Worksheets(1).Range("B2").Value = "No" Then Worksheets(1).Range("B1").Value = "Yes"
End If
End Sub