Hi All,
I'm trying to create a worksheet change event so that when the value is "In" on Column B the corresponding value in Column A will change to the first value in the data validation list.
The validation list in Column A is = "Alejandro,Not In"
The code works perfectly if Column B is "Out" It'll change the value in Column A to "Not In" but not when Column B is "In" I don't want to have to hand type every single employee's name in the code. Each individual cell of Column A has it's own validation list with first the employee's name and then Not In, as shown above.
This is the code I have right now, that isn't working properly:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .count = 1 Then
If .Row > 1 And .Column = 2 Then
If .Value = "Out" Then
.Offset(0, -1).Value = "Not In"
End If
ElseIf .Column = 3 Then
If .Value = "Out" Then
.Offset(0, -2).Value = "Not In"
If Value = "In" Then
.Offset(0, -2)(.Validation.Formula1, 2).Cells(1, 1).Value
End If