ich möchte immer alle Zeilen via Makro löschen, wenn der Inhalt der Zeile indentisch mit der ersten ist.
Ist das möglich, wenn ja wie?
Vorab vielen Dank
Sascha
Option Explicit
Sub Sascha()
Dim LoI As Long
Dim LoJ As Long
Dim LoLetzte As Long
LoLetzte = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Application.ScreenUpdating = False
For LoJ = LoLetzte To 2 Step -1
For LoI = 1 To 27
If Cells(LoJ, LoI) = Cells(1, LoI) Then
If LoI = 27 Then Rows(LoJ).Delete
Else
Exit For
End If
Next LoI
Next LoJ
Application.ScreenUpdating = True
End Sub
Sub tt()
Dim Zei As Long, Z As Long
Zei = Range("A" & Rows.Count).End(xlUp).Row
Range(Cells(2, 28), Cells(Zei, 54)).FormulaLocal = "=wenn(A2=A$1;1;0)"
Range(Cells(2, 55), Cells(Zei, 55)).FormulaLocal = "=Summe(AB2:BB2)"
For Z = Zei To 2 Step -1
If Range("BC" & Z).Value = 27 Then Rows(Z).Delete
Next Z
Range("AB2:BC" & Zei).ClearContents
End Sub
Gruß
REinhard