Re : Liste déroulante en cascade
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Col As Byte, Derli As Byte, Nom As String
If Target.Column > 2 Or Target.Address <> "$A$24" Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
For Col = 1 To 9 '9 pour la dernière colonne
If Target = Cells(1, Col) Then
Derli = Cells(25, Col).End(xlUp).Row
Nom = Range(Cells(2, Col), Cells(Derli, Col)).Address
Exit For
End If
Next
With Cells(24, "B")
.Select
.ClearContents
.Validation.Delete
.Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=" & Nom
.Value = Cells(2, Col).Value
End With
Application.EnableEvents = True
End Sub
j'ai compris le code pour à peu près tout sauf pour la necessité de nommer les listes de 2ème choix
Evidemment je les ai nommées sur la 1ere feuille car je fais tout dessus mais je ne sais pas pourquoi la macro ne marche pas , ya il une obligation sur les noms à mettre pour ces listes
Merci d'avance