DashboardNovice
Member
On Sheet1 I want to do the following:
1. If the value in H4 changes, I4 should be set to blank.
2. If the value in I4 changes, H4 should be set to blank.
The idea is that at any given time, H4 or I4 can have a value. Both cells cannot have a value at the same time. It's one or the other.
Here is the code I tried.
1. If the value in H4 changes, I4 should be set to blank.
2. If the value in I4 changes, H4 should be set to blank.
The idea is that at any given time, H4 or I4 can have a value. Both cells cannot have a value at the same time. It's one or the other.
Here is the code I tried.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("H4") Then
Range("I4").Value = ""
Else
If Target = Range("I4") Then
Range("H4").Value = ""
End If
End If
End Sub