Makro modifizieren
16.08.2007 11:45:00
Nico
wir kann ich folgendes Makro, welches jede Zeile löscht, in der Spalte A leer ist, so umbauen, daß jede Zeile gelöscht wird, in der Spalte B leer ist.
Sub DeleteRowIfEmptyCell()
Dim intRow As Integer, intLastRow As Integer
intLastRow = Cells.SpecialCells(xlCellTypeLastCell).Row
For intRow = intLastRow To 1 Step -1
If Application.CountA(Rows(intRow)) = 0 Then
intLastRow = intLastRow - 1
Else
Exit For
End If
Next intRow
For intRow = intLastRow To 1 Step -1
If IsEmpty(Cells(intRow, 1)) Then
Rows(intRow).Delete
End If
Next intRow
End Sub
Danke im Voraus und Gruß
Nico