this code is showing visible cells in listbox1
Dim oneCell As Range, LR As Long
LR = Sheets("OL BC").Range("F" & Rows.Count).End(xlUp).Row
With ListBox1
For Each oneCell In Sheets("OL BC").Range("F10:F" & LR).SpecialCells(xlCellTypeVisible)
.AddItem CStr(oneCell.Value)
Next 'oneCell
End With
and this code showing unique values in listbox1
Dim myCollection As New Collection
Dim oneCell As Range
Dim oneString As Variant
For Each oneCell In Range(Range("F8"), Range("F65536").End(xlUp))
On Error Resume Next
For Each oneString In Split(CStr(oneCell.Value), ",")
myCollection.Add Item:=oneString, Key:=oneString
Next oneString
On Error GoTo 0
Next oneCell
With RATE2.ListBox1
For Each oneString In myCollection
.AddItem oneString
Next oneString
End With
i need a mix version
visible cells + unique
Bookmarks