Hi
I am trying to find a way of automatically clearing the contents of columns C:AT in row x if the user manually clears the contents in column B in row x.
I have found a way of doing it for the first row in my sheet (row 3), however I would like to replicate this for the succeeding 100 rows. The following VBA code works for row 3...
I must also point out that this code succeeds the follwing VBA code...
So it would need to be compatible with this one too.
Hope someone can help!
Thanks
Joe
I am trying to find a way of automatically clearing the contents of columns C:AT in row x if the user manually clears the contents in column B in row x.
I have found a way of doing it for the first row in my sheet (row 3), however I would like to replicate this for the succeeding 100 rows. The following VBA code works for row 3...
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B3")) Is Nothing Then
Range("C3:AT3").ClearContents
End If
End Sub
I must also point out that this code succeeds the follwing VBA code...
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim p As Range
For Each p In Range("A1:At1").Cells
If p.Value = "N" Then
p.EntireColumn.Hidden = True
ElseIf p.Value = "Y" Then
p.EntireColumn.Hidden = False
End If
Next p
End Sub
So it would need to be compatible with this one too.
Hope someone can help!
Thanks
Joe