Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A17:A35")) Is Nothing Then Target.Offset(0, 3).Select
If Not Intersect(Target, Range("D17").EntireColumn) Is Nothing Then
If WorksheetFunction.CountIf(Range("D:D"), Target) > 1 Then
MsgBox "This product has already been chosen above you might want to edit the quantity"
With ActiveCell
.Offset(-1, -3).Range("A1").Range("A1,D1,E1,F1").Select
Selection.ClearContents
End With
End If
End If
Range("A35").End(xlUp)(2, 1).Activate
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("H2")) Is Nothing Then
MsgBox "Do not edit this cell. Use this Form instead "
End If
If Not Intersect(Target, Range("B8")) Is Nothing Then
UserForm2.Show
End If
'KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
If Not Intersect(Target, Range("D17:D35")) Is Nothing Then
If Target.Value = "" Then UserForm1.Show
End If
If Not Intersect(Target, Range("H2")) Is Nothing Then
UserForm4.Show
End If
End Sub