İlk Sütunda Seçilen Alandaki Boş Satırları Sil - Microsoft Excel


İlk sütunda seçilen alan üzerinde boş satırları tespit eden ve bulduklarını silen VBA kodu alternatifidir.

Kod


Option Explicit

Sub IlkSutundaSecilenAlandakiBosSatirlariSil()
    Dim i As Long
    
    For i = Selection(1, 1).Row + Selection.Rows.Count - 1 To Selection(1, 1).Row Step -1
        With Cells(i, 1)
            If .Value = 0 And Not .HasFormula Then
                .EntireRow.Delete
            End If
        End With
    Next
End Sub

Etiketler
microsoft excel