MFish
Board Regular
- Joined
- May 9, 2019
- Messages
- 76
Hi, is it possible for the combobox.list to not show duplicates? Here's the code I have...
In column "B" I will have a lot of duplicates. Is there a way for the list to only be the "What's new" and not duplicated items? Example:
Column B Column C
[TABLE="width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]3
[/TD]
[/TR]
</tbody>[/TABLE]
Basically in the first combobox it will only show two items to choose from... A and B.
Now, is it possible to only show the list in combobox2 off of what was chosen in combobox1? In this case if I were to select selection "A", in combobox1, then in combobox2 it will only show the values of "1, 2" and leaving out 3 because the first combobox is selected on A, respective to the data above, offset(0,1)?
Code:
Private Sub UserForm_Initialize()
Application.ScreenUpdating = False
With Worksheets("Input new run")
Me.cmbDelLH.List = .Range("B7", .Range("B7").End(xlDown)).Value
Me.cmbLegDel.List = .Range("c7", .Range("C7").End(xlDown)).Value
End With
End Sub
In column "B" I will have a lot of duplicates. Is there a way for the list to only be the "What's new" and not duplicated items? Example:
Column B Column C
[TABLE="width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]3
[/TD]
[/TR]
</tbody>[/TABLE]
Basically in the first combobox it will only show two items to choose from... A and B.
Now, is it possible to only show the list in combobox2 off of what was chosen in combobox1? In this case if I were to select selection "A", in combobox1, then in combobox2 it will only show the values of "1, 2" and leaving out 3 because the first combobox is selected on A, respective to the data above, offset(0,1)?