using portion of larger list to populate combo box

  • Thread starter Thread starter ll
  • Start date Start date
L

ll

Is there a way to use a "portion" of a larger range list in excel, to
populate a combo box? I would want to be able to input data from a
form, back to that row, and I need to find a way to get the row number
(using the partial list to populate the combo box).
Would there be a way to use a count or index in order to provide an
accurate row count?

Thanks
 
Make a two column list in your combobox, but only display one column

With Userform1.Combobox1
.Columncount = 2
for each cell in Range("A1:A100")
if cell.Value > 10 then
.AddItem cell.offset(0,1)
.List(.Listcount-1,1) = cell.row ' or cell.Address
end if
Next
End With


then

With Userform1.Combobox1
set rng = worksheets("Sheet1").Cells(.list(.listIndex,1),"B")
end with

when you want to react to the selection in the list.
 
Back
Top