Sub DatiUnivoci() Dim TuaColl As New Collection, ur As Long ur = Range("A" & Rows.Count).End(xlUp).Row For j = 2 To ur If Cells(j, 1) <> "" Then On Error Resume Next TuaColl.Add Cells(j, 1), CStr(Cells(j, 1)) On Error GoTo 0 End If Next j End Sub
Sub riempi_combo() ur = Range("B" & Rows.Count).End(xlUp).Row For r = 2 To ur If Cells(r, 2).Value = 0 Then Else ActiveSheet.ComboBox1.AddItem Cells(r, 2).Value End If Next r End Sub