Cannot debug worksheet change even below. If invalid entry entered change event is inoperable unless workbook closed and reopened. Goal is to
1. Limit entries to VBA Array PTest (trying to avoid Data Validation, if possible?) 2. want to change column F to reflect date that corresponds to value inserted in PTest.
Is this doable? I cannot even debugg to test, any suggestions?
Build
Application.EnableEvents = False
If Target.Column = 3 And Target.Row = TestsTaken + 7 Then
item = Cells(Target.Row, 3)
If IsError(WorksheetFunction.Match(item, PTests, 0)) Then
MsgBox "Please Insert Valid PTest"
Cells(Target.Row, 3) = vbNullString
Else: x = WorksheetFunction.Match(item, PTests, 0)
Cells(Target.Row, 2) = Date + Time
Cells(Target.Row, 1) = Target.Row - 6
Cells(Target.Row, 3).Font.Color = 16711680
Cells(Target.Row, 1).Resize(1, 2).HorizontalAlignment = xlCenter
Cells(Target.Row, 6) = Application.Index(PTests, x, 0)
End If
End If
TestsTaken = Sheet3.Cells(Distance, 1).End(xlDown)
Build
Application.EnableEvents = True
Bookmarks