Gruppe
Allgemein
Problem
Bei Mehrfachvorkommen eines Gruppennamens in einer Zeile sollen die nachfolgen den Doppel gelöscht werden.
StandardModule: basMain
Sub PruefenLoeschen()
Dim iRow As Integer, iRowL As Integer, iCol As Integer, iColL As Integer
Application.ScreenUpdating = False
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
For iRow = 2 To iRowL
iColL = Cells(iRow, 256).End(xlToLeft).Column
For iCol = iColL To 2 Step -1
If WorksheetFunction.CountIf(Rows(iRow), Cells(iRow, iCol).Value) > 1 Then
Cells(iRow, iCol).Delete xlShiftToLeft
End If
Next iCol
Next iRow
Application.ScreenUpdating = True
End Sub