hello ,
I search for addition condition when populate items in combobox. so what I want should just show the items in combobox based on column D if word CUST is existed in adjacent cell for column C then should not the populate items in combo box after matching column D if the adjacent cells in column C is not equal CUST . in this case should not populate item CL5 in combobox because the the adjacent cells in column C is equal supp (should be CUST)
Private Sub UserForm_Initialize()
Dim i As Long
For i = 2 To 1000
If Range("c2:c" & i) <> "CUST" Then
If WorksheetFunction.CountIf(Range("D2:D" & i), Range("D" & i)) = 1 Then
Me.Combobox1.AddItem Range("D" & i)
End If
End If
Next i
End Sub