ich will in spalte A von A2:A10000 zahlen eintragen
B von B2:B10000 ebenfalls
anschließend beide spalten auf doppelte einträge überprüfen, und alle doppelten einträge löschen.
ausführung über schaltfläche.
habe nachfolgendes makro
bei der ausführung kommt sofort Index ausserhalb des gültigen Bereichs
dafür bin ich nicht schlau genug, brauche noch`n rat
dank im vorraus, und gruß uwe
Option Explicit
Sub Doppelte()
Dim lLetzte As Long
Dim lZeile As Long
Dim rZelle As Range
Dim sFundst As String
Application.ScreenUpdating = False
lLetzte = IIf(Range("A65536") "", 65536, Range("A65536").End(xlUp).Row)
For lZeile = 2 To lLetzte
With Worksheets("Tabelle1").Range("B2:B" & Range("B65536").End(xlUp).Row)
Set rZelle = .Find(Range("A" & lZeile).Value, LookIn:=xlValue, Lookat:=xlWhole)
If Not rZelle Is Nothing Then
sFundst = rZelle.Address
Do
Range("A" & lZeile).ClearContents
Set rZelle = Cells.FindNext(rZelle)
Loop Until rZelle Is Nothing Or rZelle.Address = sFundst
End If
End With
Next lZeile
End
Sub