İlk boş satırdan itibaren

aydgur

Altın Üye
Katılım
31 Ekim 2005
Mesajlar
431
Excel Vers. ve Dili
Excel 2007 Türkçe
Altın Üyelik Bitiş Tarihi
04-03-2028
Sub Düğme5_Tıklat()



Sheets("GÖZCÜ").Select

Dim i As Integer
Dim a As Integer
a = 6
b = 6
For i = 2 To 500
If Sheets("GÖZCÜ").Cells(i, "c").Value = "1" Or Sheets("GÖZCÜ").Cells(i, "c").Value = "1/2" Then

Sheets("Ö1").Cells(a, 1).Value = a - 5
Sheets("Ö1").Cells(a, 2).Value = Sheets("GÖZCÜ").Cells(i, "f").Value
Sheets("Ö1").Cells(a, 3).Value = Sheets("GÖZCÜ").Cells(i, "e").Value
Sheets("Ö1").Cells(a, 4).Value = Sheets("GÖZCÜ").Cells(i, "d").Value
Sheets("Ö1").Cells(a, 5).Value = Sheets("GÖZCÜ").Cells(i, "a").Value
Sheets("Ö1").Cells(a, 6).Value = Sheets("GÖZCÜ").Cells(i, "b").Value
Sheets("Ö1").Cells(a, 7).Value = Sheets("GÖZCÜ").Cells(i, "g").Value
a = a + 1
End If
If Sheets("GÖZCÜ").Cells(i, "c").Value = "2" Then
Sheets("Ö2").Cells(b, 1).Value = b - 5
Sheets("Ö2").Cells(b, 2).Value = Sheets("GÖZCÜ").Cells(i, "f").Value
Sheets("Ö2").Cells(b, 3).Value = Sheets("GÖZCÜ").Cells(i, "e").Value
Sheets("Ö2").Cells(b, 4).Value = Sheets("GÖZCÜ").Cells(i, "d").Value
Sheets("Ö2").Cells(b, 5).Value = Sheets("GÖZCÜ").Cells(i, "a").Value
Sheets("Ö2").Cells(b, 6).Value = Sheets("GÖZCÜ").Cells(i, "b").Value
Sheets("Ö2").Cells(b, 7).Value = Sheets("GÖZCÜ").Cells(i, "g").Value
b = b + 1
End If

Next i
End Sub
Bu kodda Ö1 ve Ö2 sayfalarına kayıt yaparken ilk boş satırdan itibaren kayıt yapsın nasıl yapılabilir ?
 

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,058
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Kod:
a = 6
b = 6
Yazdığınız koddaki yukarıdaki satırları aşağıdaki ile değiştirerek deneyin.

Kod:
a = sheets("Ö1").[a65536].end(3).row+1
b = sheets("Ö2").[a65536].end(3).row+1
 

aydgur

Altın Üye
Katılım
31 Ekim 2005
Mesajlar
431
Excel Vers. ve Dili
Excel 2007 Türkçe
Altın Üyelik Bitiş Tarihi
04-03-2028
Çok teşekkür ederim zahmet verdim ,teşekkür ,için geç kaldım ,çünkü anca girebildim
 
Üst