andrewkard1980:
umka777_89
Пробуйте как то так:
Код:
umka777_89
Пробуйте как то так:
Код:
Private Sub UserForm_Initialize() ComboBox1.AddItem Worksheets(1).Cells(1, 1) End Sub Private Sub ComboBox1_Change() Dim i&, iRws& Set sn = Worksheets(1) iRws = sn.Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To iRws If sn.[B100] Like "*" & sn.Cells(i, 1) & "*" Then ComboBox1.AddItem sn.Cells(i, 1) End If Next i For i = ComboBox1.ListCount To 2 Step -1 If ComboBox1.List(i - 1) = ComboBox1.List(i - 2) Then ComboBox1.RemoveItem (i - 1) End If Next i Set sn = Nothing End Sub |