habe ein kleines Problem.
Habe im sheet Journal 2 spalten A B befüllt.
In spalte B gibt es doppelte werte, dann sollen die zeilen a bis b nur einmal
eingelesen werden. Habe viel gesucht aber nichts gefunden.
Vielleicht kann mir hier jemand helfen.
Hier mein Beispiel.
Private Sub Worksheet_acitvate()
Dim objDictionary As Object
Dim avntValues As Variant
Dim ialngIndex As Long
Set objDictionary = CreateObject("Scripting.Dictionary")
With Worksheets("Journal")
avntValues = .Range(.Cells(5, 1), .Cells(.Rows.Count, 2).End(xlUp)).Value
'Range(Cells(5, 1), .Cells(.Rows.Count, 2).End(xlUp)).Select
End With
For ialngIndex = LBound(avntValues) To UBound(avntValues)
If Not objDictionary.Exists(avntValues(ialngIndex, 2)) Then _
objDictionary.Add avntValues(ialngIndex, 2), vbNullString
Next
'Sheets("Auswertung").ListBox1.ListFillRange = "Journal!" & rng.Address
Sheets("Auswertung").ListBox1.List = objDictionary.Keys
Set objDictionary = Nothing
End Sub