• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

iki satır değeri sayı ise araya boş satır ekle

  • Konbuyu başlatan Konbuyu başlatan BG
  • Başlangıç tarihi Başlangıç tarihi

BG

Özel Üye
Katılım
5 Mayıs 2008
Mesajlar
1,384
Excel Vers. ve Dili
Office 2021 TR & EN
Merhaba,

Soruyu örnek dosya içine yazdım, ilgilenen arkadaşlarıma teşekkür ederim.
 

Ekli dosyalar

Deneyiniz.

Kod:
Private Sub CommandButton1_Click()
    Son = Cells(Rows.Count, 1).End(3).Row
    
    For X = Son To 3 Step -1
        If IsNumeric(Cells(X, 1)) Then
            If X = 3 Then GoTo 10
            For Y = X - 1 To X - 9 Step -1
                If Not IsNumeric(Cells(Y, 1)) Or Cells(Y, 1) = "" Then
                    Say = Say + 1
                Else
                    Exit For
                End If
            Next
            If Say <> 9 Then
                Range("A" & X & ":A" & X + 9 - Say - 1).EntireRow.Insert
            End If
            X = Y + 1
            Say = 0
        End If
    Next
10  MsgBox "İşleminiz tamamlanmıştır."
End Sub
 
Son = Cells(Rows.Count, 1).End(3).Row For X = Son To 3 Step -1 If IsNumeric(Cells(X, 1)) Then If X = 3 Then GoTo 10 For Y = X - 1 To X - 9 Step -1 If Not IsNumeric(Cells(Y, 1)) Or Cells(Y, 1) = "" Then Say = Say + 1 Else Exit For End If Next If Say <> 9 Then Range("A" & X & ":A" & X + 9 - Say - 1).EntireRow.Insert End If X = Y + 1 Say = 0 End If Next
Korhan Üstat,
ilgine teşekkür ederim, kolay gelsin çok sağol...
 
Geri
Üst