kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
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 & "=" & Chr(34) & Me.ComboBox1.Value & Chr(34) & "," & .Address & ",""#""))"), "#", False)
End With
Me.ComboBox2.List = Lst
End Sub
This code was written by @Fluff and has been running smoothly until I tried it with numbers instead of the usual string.
Instead of the X, Y, Z criteria I was using before, I am now using 1, 2, 3 criteria but the code is not able to load the data into combobox2.
Can someone please fix that for me?
Thanks in advance.