Hello
I need to show separated range in listbox for each name when match name in combobox with name in column I
I got code from the intenet and try modifying but gives mismatch error in this line
Lst = Application.Index(.Value2, Application.Transpose(Rws), Array(9, 10, 11, 12, 13))
Private Sub ComboBox1_Click()
Dim Lst As Variant, Rws As Variant
With Sheets("DAILY").Range("H1").CurrentRegion
Rws = Filter(.Parent.Evaluate(Replace("transpose(if(@=" & Chr(34) & Me.ComboBox1 & Chr(34) & ",row(@),false))", "@", .Columns(10).Address)), False, False)
Lst = Application.Index(.Value2, Application.Transpose(Rws), Array(9, 10, 11, 12, 13))
If UBound(Rws) = 0 Then Lst = .Rows(Rws(0)).Value
End With
Me.ListBox1.List = Lst
End Sub
I put picture how could show on userfrom after select name from combobox and match with column I ,but keep in your mind in the picture show TOTAL row in first column in listbox but in range in sheet is in column I , so I don't mind if show in second or firts column in listbox .the most importand should also show TOTAL row
thanks in advance