Private Sub LesChks(Ctl As Control)
Dim Cel As Range, i%, Col%
With Sheets("Functions")
For i = 6 To .UsedRange.Columns.Count
If .Cells(1, i) = Me.Reference_HC.List(0) Then Col = i: Exit For
Next i
Select Case Ctl.Value
Case True
For Each Cel In .Range(.Cells(2, Col), .Cells(.Cells(Rows.Count, 4).End(xlUp).Row, Col))
If Cel <> "" Then
Select Case Len(Cel.Text)
Case Is = 1
If Cel.Text = Ctl.Caption Then Me.Functions.AddItem .Cells(Cel.Row, 2).Value
Case Else
For i = 1 To Len(Trim(Cel.Text))
If Mid(Cel.Text, i, 1) = Ctl.Caption Then Me.Functions.AddItem .Cells(Cel.Row, 2).Value
Next i
End Select
End If
Next Cel
Case False
For i = Me.Functions.ListCount - 1 To 0 Step -1
For Each Cel In .Range(.Cells(2, Col), .Cells(.Cells(Rows.Count, 4).End(xlUp).Row, Col))
If Cel <> "" And .Cells(Cel.Row, 2) = Me.Functions.List(i) Then
Me.Functions.RemoveItem (i)
Exit For
End If
Next Cel
Next i
Functions_change
End Select
End With
End Sub