Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
Modification of listbox to listbox code | Excel Programming | |||
Modification of listbox to listbox code | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |