Morning all, perhaps an easy question here, perhaps i'm being silly. I have a combobox which i have coded to display dynamic info. so it displays info in my A column and will display new info when i add something different.
What i would like it to do though is only display each name in that column once. So at the moment, if someone's name is in the first column and i select it and submit the data, their name will be another option in the drop down.
I would love it to only display each individual name once and not multiple times as the chances are there will be alot of the same name occuring if that makes sense?
The code i am using to make the info appear dynamically is below and i have defined the namelist with the second code
What i would like it to do though is only display each name in that column once. So at the moment, if someone's name is in the first column and i select it and submit the data, their name will be another option in the drop down.
I would love it to only display each individual name once and not multiple times as the chances are there will be alot of the same name occuring if that makes sense?
The code i am using to make the info appear dynamically is below and i have defined the namelist with the second code
Private Sub UserForm_Initialize()
'Populate Name combo box.
Dim rngName As Range
Dim ws As Worksheet
Set ws = Worksheets("Querylog")
For Each rngName In ws.Range("Namelist")
Me.txtName.AddItem rngName.Value
Next rngName
End Sub
=OFFSET(QueryLog!$A$2:$A$14, 0, 0, COUNTA(QueryLog!$A:$A)-1,1)