Bonsoir,
cf PJ
1-Avec Données/validation
=DECALER(Liste;EQUIV(F8&"*";Liste;0)-1;;NB.SI(Liste;F8&"*"))
Frapper les premières lettres puis cliquer sur la flèche
2- Avec ComboBox (la vraie saisie intuitive type GOOGLE)
Il suffit de frapper les premiers caractères
Dim a()
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect([F8:F20], Target) Is Nothing And Target.Count = 1 Then
a = Sheets("Posture pénible des tâches").Range("liste").Value
Me.ComboBox1.List = a
Me.ComboBox1.Height = Target.Height + 3
Me.ComboBox1.Width = Target.Width
Me.ComboBox1.Top = Target.Top
Me.ComboBox1.Left = Target.Left
Me.ComboBox1 = Target
Me.ComboBox1.Visible = True
Me.ComboBox1.Activate
Else
Me.ComboBox1.Visible = False
End If
End Sub
Private Sub ComboBox1_Change()
If Me.ComboBox1 <> "" And IsError(Application.Match(Me.ComboBox1, a, 0)) Then
Set d1 = CreateObject("Scripting.Dictionary")
tmp = UCase(Me.ComboBox1) & "*"
For Each c In a
If UCase(c) Like tmp Then d1(c) = ""
Next c
Me.ComboBox1.List = d1.keys
Me.ComboBox1.DropDown
End If
ActiveCell.Value = Me.ComboBox1
End Sub
Ceuzin