Private Sub Worksheet_Change(ByVal Target As Range)
Dim DVCells As Range
Set DVCells = Intersect(Target, Range("Tabela13[Status]"))
If Not DVCells Is Nothing Then
On Error Resume Next
Me.Unprotect
For Each cll In DVCells
Select Case cll.Value
Case "A": VD = "B"
Case "B": VD = "A"
Case "C": VD = "D"
Case "D": VD = "C"
Case Else: VD = "A,B,C,D"
End Select
With cll.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=VD
End With
Next cll
Me.Protect
End If
End Sub