kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
The code below here was written for me by @Fluff some time ago. It's a very wonderful code and I love it.
I have added 2 more comboboxes to use as the criteria for doing my filtering but I am stacked with how to get it tweaked.
The new comboboxes are:
ComboBox3, which will check column Y and ComboBox4, which points to column Z
That is, the values from box1, box3 and box4 must all match in the Worksheet before box2 is populated.
Thanks in advance.
I have added 2 more comboboxes to use as the criteria for doing my filtering but I am stacked with how to get it tweaked.
The new comboboxes are:
ComboBox3, which will check column Y and ComboBox4, which points to column Z
That is, the values from box1, box3 and box4 must all match in the Worksheet before box2 is populated.
Thanks in advance.
Code:
Private Sub ComboBox1_Click()
Dim Lst As Variant
Dim db As Worksheet
Dim i As Long
Set db = Sheets("Sheet1")
With db.Range("B4", db.Range("B" & Rows.Count).End(xlUp))
Lst = Filter(db.Evaluate("transpose(if(" & .Offset(, 1).Address & "=" & Me.ComboBox1.Value & "," & .Address & ",""#""))"), "#", False)
End With
Me.ComboBox2.List = Lst
End Sub