Hi Experts,
Please anyone can help me figure out to modify the code below that
it would display Distinct value and ignore blanks cells.
Private Sub ComboBox1_Change()
Dim N, e
With Sheets("Orders").Range("A:A")
N = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In N
If Not .exists(e) Then .Add e, Nothing
Next
If e <> "" And Not .exists(e) Then .Add e, Nothing
End With
End Sub
Thanks in advance,
12Rev79
Please anyone can help me figure out to modify the code below that
it would display Distinct value and ignore blanks cells.
Private Sub ComboBox1_Change()
Dim N, e
With Sheets("Orders").Range("A:A")
N = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In N
If Not .exists(e) Then .Add e, Nothing
Next
If e <> "" And Not .exists(e) Then .Add e, Nothing
End With
End Sub
Thanks in advance,
12Rev79