Hello,
The code below is supposed/meant to do the following:
if the content of a cell in column B is equal or changes to any value that is part of a list in range B118:B124, the cell in column D (and corresponding/same row) will autopopulate to "Hol". That is accomplished by the first block of code, which works great if run by itself (if I delete the second block).
The second block is meant to clear cells in column D only if the cell contains specific content ("Hol") when the cell in corresponding row of column B is changed to anything....other than any values that are part of the list B118:B124.
What am I missing in the code below? any help would be greatly appreciated. Thanks!
For Each cell In Target
If Target.Column = 2 And (Target.Row >= 2 And Target.Row <= 100) Then
End Sub
The code below is supposed/meant to do the following:
if the content of a cell in column B is equal or changes to any value that is part of a list in range B118:B124, the cell in column D (and corresponding/same row) will autopopulate to "Hol". That is accomplished by the first block of code, which works great if run by itself (if I delete the second block).
The second block is meant to clear cells in column D only if the cell contains specific content ("Hol") when the cell in corresponding row of column B is changed to anything....other than any values that are part of the list B118:B124.
What am I missing in the code below? any help would be greatly appreciated. Thanks!
For Each cell In Target
If Not Intersect(cell, Range("B:B")) Is Nothing Then
If Application.WorksheetFunction.CountIf(Range("B118:B124"), cell) Then
Range("D" & cell.Row) = "Hol"
End If
End If
NextIf Target.Column = 2 And (Target.Row >= 2 And Target.Row <= 100) Then
If Target.Offset(0, 2).Value = "Hol" Then
Target.Offset(0, 2).ClearContents
End If
End IfEnd Sub