Try the below code, I believe it is what you're looking for, or at least it will get you started. Play around with it before actually applying it.
Private Sub Worksheet_Change(ByVal Target As Range)
'set your criteria here
If Target = Me.Range("A1") Then
If (Trim(Me.Range("B1")) <> "") Then
UndoEvent
End If
ElseIf Target = Me.Range("B1") Then
If (Trim(Me.Range("A1")) <> "") Then
UndoEvent
End If
End If
End Sub
Private Sub UndoEvent()
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
MsgBox "YOU CAN'T DO THAT!!!"
End Sub
Hope this helps.
Wes
Bookmarks