Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
I've set a dropdown list as follows:
https://imgur.com/a/ntDkIK9
For each record in column A, the user can select YES or NO.
The complication is:
some of the choices are not possible, meaning that if one record in column A is also present in column J, the only choice in column B is NO, so I have to set it in advance not allowing the user any action.
So, in this case, the value cells in B3, B4, B8 and B11 has to be "NO".
How could I manage this scenario?
I've set a dropdown list as follows:
https://imgur.com/a/ntDkIK9
Code:
Dim MyListB(2) As String
MyListB(0) = "YES"
MyListB(1) = "NO"
Dim lrut2 As Long
lrut2 = Cells(Rows.Count, "A").End(xlUp).Row
With Range("B2:B" & lrut2).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:=Join(MyListB, ",")
End With
For each record in column A, the user can select YES or NO.
The complication is:
some of the choices are not possible, meaning that if one record in column A is also present in column J, the only choice in column B is NO, so I have to set it in advance not allowing the user any action.
So, in this case, the value cells in B3, B4, B8 and B11 has to be "NO".
How could I manage this scenario?