أخى الفاضل / عادل ابو زيد
تفضل ما تريد
Private Sub ComboBox1_Click()
Me.ComboBox2.Clear
On Error Resume Next
i = Application.WorksheetFunction.Match(ComboBox1.Value, Range("B1:IV1"), 0) + 1
LR1 = Cells(Rows.Count, i).End(xlUp).Row
Range(Cells(2, i), Cells(LR1, i)).Sort key1:=Cells(2, i), Order1:=xlAscending
For T = 2 To LR1
If Cells(T, i) <> "" Then
Me.ComboBox2.AddItem Cells(T, i)
End If
Next
End Sub
Private Sub ComboBox2_Click()
Me.ComboBox3.Clear
On Error Resume Next
i = Application.WorksheetFunction.Match(ComboBox2.Value, Range("b1:IV1"), 0) + 1
LR2 = Cells(Rows.Count, i).End(xlUp).Row
Range(Cells(2, i), Cells(LR2, i)).Sort key1:=Cells(2, i), Order1:=xlAscending
For y = 2 To LR2
If Cells(y, i) <> "" Then
Me.ComboBox3.AddItem Cells(y, i)
End If
Next
End Sub
Private Sub UserForm_Initialize()
LR = [A1000].End(xlUp).Row
For Each cl In Range("A2:A" & LR)
Range("A2:A" & LR).Sort key1:=Range("A2"), Order1:=xlAscending
If cl <> "" Then
Me.ComboBox1.AddItem cl
End If
Next
End Sub
Book1.rar