(Solved) – how extract some informations from range of sheet1 and put it on a combobox

(solved)-–-how-extract-some-informations-from-range-of-sheet1-and-put-it-on-a-combobox

enter image description here

I am facing a little problem, I have a userform which contains two comboboxes, a combobox1 for “company name” and another combobox2 for “specialty”
I really want that when I choose for example like in the photo, I choose in combobox1 “teter”, I want to display in combobox2 a list which contains only MP and PDP
and if I choose teterss in combobox1, I would like to display in combobox2 only PDP, I tried this in combobox2 which allows you to search only in column H compared to the choice I chose in combobox1 but it does not work

Dim i As Long
  Dim isearch As Long
isearch = Worksheets("FRS").Range("A" & Rows.Count).End(xlUp).Row
    For i = 2 To isearch
      If Trim(sheets7.Cells(i, 1)) = Trim(Combobox1.Value) Then

        Combobox2.Value = sheets7.Cells(i, 8).Value

        Exit For
      End If
    Next i

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *