perhaps this will help
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Dim oldVal As String, newVal As String
On Error GoTo exitHandler
With Application
If Intersect(Target, Cells.SpecialCells(xlCellTypeAllValidation)) Is Nothing Then Exit Sub
.EnableEvents = False
newVal = Target.Value: .Undo: oldVal = Target.Value
Target.Value = newVal
Select Case Target.Column
Case 8, 11
Target.Offset(, 1).Resize(, 2).ClearContents 'I would like Column I and Column J to clear contents when Column H is updated
Case 9, 12
If oldVal <> "" Then
If newVal <> "" Then
If InStr(1, oldVal, newVal) > 0 Then
If Right(oldVal, Len(newVal)) = newVal Then
Target.Value = Left(oldVal, Len(oldVal) - Len(newVal) - 2)
Else
Target.Value = Replace(oldVal, newVal & ", ", "")
End If
Else
Target.Value = oldVal & ", " & newVal
End If
End If
End If
Case 10, 13
If oldVal <> "" Then
If newVal <> "" Then Target.Value = oldVal & ", " & newVal
End If
End Select
exitHandler:
.EnableEvents = True
End With
End Sub
Bookmarks