Public
Sub
Doppelte_raus()
Dim
loZeile
As
Long
, loSpalte
As
Long
With
Worksheets(
"Tabelle3"
)
loZeile = .Cells(.Rows.Count,
"A"
).
End
(xlUp).Row
loSpalte = .Cells(1, .Columns.Count).
End
(xlToLeft).Offset(, 1).Column
.Range(.Cells(2, loSpalte), .Cells(loZeile, loSpalte)).FormulaLocal = _
"=WENN(ZÄHLENWENNS($B$2:$B$"
& loZeile &
";B2;$C$2:$C$"
& loZeile &
";C2)>1;0;ZEILE())"
.Range(.Cells(2, loSpalte), .Cells(loZeile, loSpalte)).Value = _
.Range(.Cells(2, loSpalte), .Cells(loZeile, loSpalte)).Value
.Cells(1, loSpalte) = 0
.Range(.Cells(1, 1), .Cells(loZeile, loSpalte)).RemoveDuplicates Columns:=loSpalte, _
Header:=xlNo
.Columns(loSpalte).ClearContents
End
With
End
Sub