Hi all

I am trying to populate a combobox on a userform with data list from a sheet (strSheetName). I want to first remove duplicates and blanks from the list, sort the data in decending order and then populate a combobox.

I have the code to remove duplicates and populate the combobox as shown below, but I don't know how to amend it to remove blanks and to sort it. Can anyone help advise?

Private Sub Populate_cboSupplier()
    Dim Lr As Long, cell As Range
    'Populate Combobox1 with unique names from Sheets(1) column D
    With Sheets(strSheetName)
        Lr = .Range("H" & Rows.Count).End(xlUp).Row
        .Range("H2:H" & Lr).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
        cboSuppliers.Clear
        For Each cell In .Range("H3:H" & Lr).SpecialCells(xlCellTypeVisible)
            cboSuppliers.AddItem cell.Value
        Next cell
        On Error Resume Next
        .ShowAllData
        On Error GoTo 0
    End With
End Sub