• DİKKAT

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

Soru Alt alta kayıt etme

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
Kod:
For d = 3 To [c65536].End(xlUp).Row
If Cells(d, "c").Value = CDbl(TextBox1.Value) Then
MsgBox " Bu TC KİMLİK No. Kayıtlıdır Kontrol edip, düzeltiniz." _
& Chr(10) & "Girişiniz iptal edildi.", vbCritical, "MÜKERRER", "Hatırlatma"
TextBox1.Value = ""
Exit Sub
End If
Next d
Set sahife = Sheets("Sayfa1")
bossatir = sahife.Cells(Rows.Count, "D").End(3).Row + 1
ilk = bossatir
sahife.Range("B" & bossatir).Value = Application.WorksheetFunction.Max(sahife.Range("B:B")) + 1
sahife.Range("C" & bossatir).Value = TextBox1.Value 'T.C KİMLİK NO
sahife.Range("D" & bossatir).Value = TextBox2.Value 'ADI SOYADI
If ComboBox4 <> "" Then
    sahife.Range("E" & bossatir).Value = ComboBox4.Value 'ÜRÜN ADI
    sahife.Range("F" & bossatir).Value = TextBox4.Value 'Arazi Miktarı
    sahife.Range("G" & bobossatirs).Value = Format(TextBox6.Value, "#,##0.00") * 1 'Ürün Fiyatı
    sahife.Range("H" & bossatir).Value = Format(TextBox8.Value, "#,##0.00") * 1 'Verim
    sahife.Range("I" & bossatir).Value = Format(TextBox5.Value, "#,##0.00") * 1 'Brüt Gelir
    sahife.Range("J" & bossatir).Value = Format(TextBox10.Value, "#,##0.00") * 1 'Maliyet
    sahife.Range("K" & bossatir).Value = Format(TextBox11.Value, "#,##0.00") * 1 'Toplam Net Gelir
    sahife.Range("L" & bossatir).Value = Format(TextBox76.Value, "#,##0.00") * 1 'Tarım Yıllık Toplam Net Geliri (TL)
    bossatir = bossatir + 1
End If
If ComboBox5 <> "" Then
    sahife.Range("E" & bossatir).Value = ComboBox5.Value 'ÜRÜN ADI
    sahife.Range("F" & bossatir).Value = TextBox13.Value 'Arazi Miktarı
    sahife.Range("G" & bossatir).Value = Format(TextBox15.Value, "#,##0.00") * 1 'Ürün Fiyatı
    sahife.Range("H" & bossatir).Value = Format(TextBox17.Value, "#,##0.00") * 1 'Verim
    sahife.Range("I" & bossatir).Value = Format(TextBox14.Value, "#,##0.00") * 1 'Brüt Gelir
    sahife.Range("J" & bossatir).Value = Format(TextBox19.Value, "#,##0.00") * 1 'Maliyet
    sahife.Range("K" & bossatir).Value = Format(TextBox20.Value, "#,##0.00") * 1 'Toplam Net Gelir
    sahife.Range("L" & bossatir).Value = Format(TextBox76.Value, "#,##0.00") * 1 'Tarım Yıllık Toplam Net Geliri (TL)
    bossatir = bossatir + 1
End If
If ComboBox6 <> "" Then
    sahife.Range("E" & bossatir).Value = ComboBox6.Value 'ÜRÜN ADI
    sahife.Range("F" & bossatir).Value = TextBox22.Value 'Arazi Miktarı
    sahife.Range("G" & bossatir).Value = Format(TextBox24.Value, "#,##0.00") * 1 'Ürün Fiyatı
    sahife.Range("H" & bossatir).Value = Format(TextBox26.Value, "#,##0.00") * 1 'Verim
    sahife.Range("I" & bossatir).Value = Format(TextBox23.Value, "#,##0.00") * 1 'Brüt Gelir
    sahife.Range("J" & bossatir).Value = Format(TextBox28.Value, "#,##0.00") * 1 'Maliyet
    sahife.Range("K" & bossatir).Value = Format(TextBox29.Value, "#,##0.00") * 1 'Toplam Net Gelir
    sahife.Range("L" & bossatir).Value = Format(TextBox76.Value, "#,##0.00") * 1 'Tarım Yıllık Toplam Net Geliri (TL)
    bossatir = bossatir + 1
End If
If ComboBox7 <> "" Then
    sahife.Range("E" & bossatir).Value = ComboBox7.Value 'ÜRÜN ADI
    sahife.Range("F" & bossatir).Value = TextBox31.Value 'Arazi Miktarı
    sahife.Range("G" & bossatir).Value = Format(TextBox33.Value, "#,##0.00") * 1 'Ürün Fiyatı
    sahife.Range("H" & bossatir).Value = Format(TextBox35.Value, "#,##0.00") * 1 'Verim
    sahife.Range("I" & bossatir).Value = Format(TextBox32.Value, "#,##0.00") * 1 'Brüt Gelir
    sahife.Range("J" & bossatir).Value = Format(TextBox37.Value, "#,##0.00") * 1 'Maliyet
    sahife.Range("K" & bossatir).Value = Format(TextBox38.Value, "#,##0.00") * 1 'Toplam Net Gelir
    sahife.Range("L" & bossatir).Value = Format(TextBox76.Value, "#,##0.00") * 1 'Tarım Yıllık Toplam Net Geliri (TL)
    bossatir = bossatir + 1
End If
If ComboBox8 <> "" Then
    sahife.Range("E" & bossatir).Value = ComboBox8.Value 'ÜRÜN ADI
    sahife.Range("F" & bossatir).Value = TextBox40.Value 'Arazi Miktarı
    sahife.Range("G" & bossatir).Value = Format(TextBox42.Value, "#,##0.00") * 1 'Ürün Fiyatı
    sahife.Range("H" & bossatir).Value = Format(TextBox44.Value, "#,##0.00") * 1 'Verim
    sahife.Range("I" & bossatir).Value = Format(TextBox41.Value, "#,##0.00") * 1 'Brüt Gelir
    sahife.Range("J" & bossatir).Value = Format(TextBox46.Value, "#,##0.00") * 1 'Maliyet
    sahife.Range("K" & bossatir).Value = Format(TextBox47.Value, "#,##0.00") * 1 'Toplam Net Gelir
    sahife.Range("L" & bossatir).Value = Format(TextBox76.Value, "#,##0.00") * 1 'Tarım Yıllık Toplam Net Geliri (TL)
    bossatir = bossatir + 1
End If
'For sut = 2 To 4 8 to 8
'    If sut = 5 Then sut = 12
'    sahife.Range(sahife.Cells(ilk, sut), sahife.Cells(bos, sut)).Merge
'Next
For sut = 2 To 4
    If sut = 5 Then
        sut = 12
    End If
    sahife.Range(sahife.Cells(ilk, sut), sahife.Cells(bossatir, sut)).Merge
Next
For sut = 12 To 12
    sahife.Range(sahife.Cells(ilk, sut), sahife.Cells(bossatir, sut)).Merge
Next
MsgBox "......Kayıt İşlemi Başarı İle Gerçekleştirildi......"
ThisWorkbook.Save

Yukarıdaki kod bloğu ile Sayfa1' e kayıt yapıyorum. Ancak ikinci veri girişini yapamıyorum. Rica etsem "B" sütununa göre alt alta kayıt edebilir şekilde düzenlenmesine yardımcı olabilir misiniz?
 
Son düzenleme:
Merhaba,
Paylaştığınız kod doğru işlem yapıyorsa anladığım kadarıyla kodunuzun aşağıdaki satırdaki "D" ifadesini "E" yaparak deneyiniz.
Rich (BB code):
bossatir = sahife.Cells(Rows.Count, "D").End(3).Row + 1
 
Geri
Üst