One more thing please. i would like to move the two comboboxs to Sheet2 but mantaining the lists in sheet1. What i have to change in code?
'----------------------------------------------------------
Dim rng As Range, c As Range, r As Range, f As Range
Dim rws As Long, y As Integer
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address <> "$C$1" Then Exit Sub
rws = ActiveSheet.UsedRange.Columns(1).Rows.Count
ComboBox1.ListFillRange = ""
ComboBox1.List = Filter(Evaluate("transpose(if(countif(offset(a2:a" & rws & ",0,0,row(1:" & _
rws - 1 & ")),a2:a" & rws & ")=1,a2:a" & rws & ",char(2)))"), Chr(2), 0)
End Sub
Private Sub ComboBox1_Change()
rws = ActiveSheet.UsedRange.Columns(1).Rows.Count
ComboBox2.Clear
Set r = Range(Cells(1, 1), Cells(rws, 1))
For Each c In r.Cells
If c = ComboBox1 Then ComboBox2.AddItem c.Offset(0, 1)
Next c
With ComboBox2
.Activate
.Application.SendKeys ("%{down}")
End With
End Sub
Thanks
Bookmarks