Skopweb
08-20-2009, 11:16 PM
Hello
I have the following script that helps me to clear cells C3 and D3 if i change the value in cell B3
Is there a way i can apply this to the entire coloumn and clear its corresponding cell for that row
--------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Application.EnableEvents = False
If Target.Value = "Yes" Then
With Range("$C$3")
.Value = ""
End With
With Range("$D$3")
.Value = ""
End With
Else
With Range("$C$3")
.Value = ""
End With
With Range("$D$3")
.Value = ""
End With
End If
End If
Application.EnableEvents = True
End Sub
--------------------------
I have the following script that helps me to clear cells C3 and D3 if i change the value in cell B3
Is there a way i can apply this to the entire coloumn and clear its corresponding cell for that row
--------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Application.EnableEvents = False
If Target.Value = "Yes" Then
With Range("$C$3")
.Value = ""
End With
With Range("$D$3")
.Value = ""
End With
Else
With Range("$C$3")
.Value = ""
End With
With Range("$D$3")
.Value = ""
End With
End If
End If
Application.EnableEvents = True
End Sub
--------------------------