Selamlar,
Aşağıdaki kodu denermisiniz.
Kod:Option Explicit Sub TABLO_OLUŞTUR() Dim X As Integer, EK1 As Byte, EK2 As Byte Range("E:G").ClearContents EK1 = 1 EK2 = 1 For X = 5 To 2000 Step 14 If EK1 = 2 Or EK1 = 45 Or EK1 = 62 Then Cells(X, "E") = "AB_" & Format(EK1, "00") Cells(X + 1, "E") = "CD_" & Format(EK1, "00") Cells(X + 2, "E") = "EF_" & Format(EK1, "00") Cells(X, "F") = "klm" Cells(X + 1, "F") = "abc" Cells(X + 2, "F") = "klm" Cells(X, "G") = "SCD_" & Format(EK2, "00") Cells(X + 1, "G") = "EKL_" & Format(EK1, "00") Cells(X + 2, "G") = "ESP_" & Format(EK1, "00") EK1 = EK1 + 1 EK2 = EK2 + 1 If EK1 = 81 Then Exit For Else Cells(X, "E") = "AB_" & Format(EK1, "00") Cells(X + 1, "E") = "CD_" & Format(EK1, "00") Cells(X + 2, "E") = "EF_" & Format(EK1, "00") Cells(X, "F") = "xyz" Cells(X + 1, "F") = "abc" Cells(X + 2, "F") = "klm" Cells(X, "G") = "AKL_" & Format(EK1, "00") Cells(X + 1, "G") = "EKL_" & Format(EK1, "00") Cells(X + 2, "G") = "ESP_" & Format(EK1, "00") EK1 = EK1 + 1 If EK1 = 81 Then Exit For End If Next MsgBox "İşleminiz tamamlanmıştır.", vbInformation End Sub
Selamlar,
Denedim çalıştı,Sonsuz teşekkür ederim;sayenizde "else" kodunun büyüklüğünü anladım
Sizlerle paylaşabileceğim bilgi birikimine sahip olabilmem ümidiyle...
Saygılarımla
