Hello,

I am trying to create a 2 column listbox using data from column "O" and
column "I" in a spreadsheet. Additionally, there are duplicate values in
these columns. I would like to remove any duplicates so the Listbox only
shows one of each value in the list. Also, no blank rows. Below is code that
I have used for one column, but I am not familiar with creating two columns
and then removing any duplicate values. Any help would be greatly
appreciated. Thank You,


Dim myRng As Range
Dim myCell As Range


With ActiveSheet
Set myRng = .Range("O1", .Cells(.Rows.Count, "O").End(xlUp))
End With

For Each myCell In myRng.Cells
If myCell.Value = 0 Or myCell.Value = "SPC" Then
Else
Me.ListBox1.AddItem myCell.Value
End If
Next myCell