Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "Dashboard" Or Sh.Name = "FBAout" Then Exit Sub
Dim myCell As Range, dest As Range, oRange As Range, sCol As Range
Dim myCol As String, sStr As String
Application.EnableEvents = False
On Error GoTo CleanUp
Set myCell = Range("A1:I2").Find("Enter Below", LookIn:=xlValues, lookat:=xlWhole).Offset(1, 0)
If Target.Address <> myCell.Address Then Exit Sub
myCol = ConvertToLetter(myCell.Column - 3)
If Len(Target) > 0 Then
Set oRange = Range("A2:" & myCol & "1000").Find(Target, lookat:=xlWhole)
End If
If Not oRange Is Nothing Then
MsgBox oRange & " - is a duplicate entry, see cell " & oRange.Address
Set dest = Cells(Rows.Count, "L").End(xlUp)(2)
dest = Target
dest.Offset(, 1) = Date
Target.Select
Target.ClearContents
Application.EnableEvents = True
Exit Sub
Else
'/ This is the message box code to delete when not wanted any more, Leave "Else" to "End If" blank
End If
Select Case Sh.Name
Case "Dark Brindle 6 x 8", "710E", "HJQ_", "Cowboy Decoration"
If Mid(Target, 11, 1) = "L" Then
Set dest = Cells(Rows.Count, "A").End(xlUp)(2)
End If
Case "XX 121 Calfskin", "80%Brown & White Calfskin", "Brown & 80% White Calfskin", _
"Chocolate Calfskin", "Black & White Calfskin", "Cream Caramel Calfskin", "Brown & White Calfskin Web", _
"Black & White Calfskin Web", "Panda Calfskin Web", "Panda Calfskin", "Tropical White Calfskin", _
"Creamy Caramel Calfskin Web", "Tropical White Calfskin Web"
If Mid(Target, 11, 1) = "C" Then
Set dest = Cells(Rows.Count, "A").End(xlUp)(2)
End If
Case "Round Star Brown Web", "Round Star Black&White Web"
If Mid(Target, 11, 1) = "R" Then
Set dest = Cells(Rows.Count, "A").End(xlUp)(2)
End If
Case Else
Select Case Mid(Target, 11, 1)
Case "S"
sStr = "Small"
Case "M"
sStr = "Medium"
Case "L"
sStr = "Large"
Case "E"
sStr = "Exotic"
Case "C"
sStr = "Calfskin"
Case "R"
sStr = "Round Rug"
End Select
Set sCol = Range("A2:" & myCol & "2").Find(sStr, LookIn:=xlValues, lookat:=xlWhole)
If Not sCol Is Nothing Then
Set dest = Cells(Rows.Count, sCol.Column).End(xlUp)(2)
End If
End Select
If Not dest Is Nothing Then
dest = Target
Target.Select
Target.ClearContents
Else
Target.Select
MsgBox "Check your entry"
End If
CleanUp:
Application.EnableEvents = True
End Sub