Skip to main content

AccessTr.neT


Excelde Tüm Sutunları Boş Olan Satırları Topluca Nasıl Silebiliriz

Excelde Tüm Sutunları Boş Olan Satırları Topluca Nasıl Silebiliriz

#9
son satırın belirlenebileceği farklı bir kod

Kod:
Sub delete_rows_blank2()

t = 1
lastrow = ActiveSheet.UsedRange.Rows.Count
lastcol = ActiveSheet.UsedRange.Columns.Count

Do Until t = lastrow

For j = 1 To lastcol
    'This only checks the first column because the "Else" statement below will skip to the next row if the first column has content.
    If Cells(t, j) = "" Then

        j = j + 1

            If j = lastcol Then
            Rows(t).Delete
            t = t + 1
            End If

    Else
    'Note that doing this row skip, may prevent user from checking other columns for blanks.
        t = t + 1

    End If

Next

Loop

End Sub

Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Satırı Tamamen Silmek - Yazar: accessman - 14/01/2020, 08:13
Cvp: Excelde Tüm Sutunları Boş Olan Satırları Topluca Nasıl Silebiliriz - Yazar: accessman - 14/01/2020, 12:32
Task