- Katılım
- 22 Aralık 2010
- Mesajlar
- 13
- Excel Vers. ve Dili
- excell 2016
Excel sayfasına veri giriş olarak yaptığım bilgiler başka sayfada çıktı olarak alınmaktadır. Buton yardımı ile sheet1 deki bilgileri sheet2'ye kopyalayarak alt alta sırlama yapak ve aynı butonlada aynı bilgi varsa kopyalama yapmasın istiyorum. Ekli sayfada beceremedim. Lütfen yardım edin.
Private Sub CommandButton1_Click()
Dim x As Boolean
x = False
For i = 1 To Sheets("VERİ").Cells(65536, 1).End(xlUp).Row
If TextBox1.Text = Sheets("VERİ").Cells(i, 1) And TextBox2.Text = Sheets("VERİ").Cells(i, 2) Then
x = True
MsgBox ("Mükerrer kayıt")
Exit For
End If
Next i
If x = False Then
Sheets("VERİ").Cells(i, 1) = TextBox1
Sheets("VERİ").Cells(i, 2) = TextBox2
say = Worksheets("VERİ").Range("A65530").End(3).Row + 1
Worksheets("VERİ").Range("A" & say) = Worksheets("MUVAFAKAT").Range("K5")
Worksheets("VERİ").Range("B" & say) = Worksheets("MUVAFAKAT").Range("K4")
Worksheets("VERİ").Range("C" & say) = Worksheets("MUVAFAKAT").Range("K6")
Worksheets("VERİ").Range("D" & say) = Worksheets("MUVAFAKAT").Range("A10")
Worksheets("VERİ").Range("E" & say) = Worksheets("MUVAFAKAT").Range("A14")
Worksheets("VERİ").Range("F" & say) = Worksheets("MUVAFAKAT").Range("Y18")
Worksheets("VERİ").Range("G" & say) = Worksheets("MUVAFAKAT").Range("Y19")
Worksheets("VERİ").Range("H" & say) = Worksheets("MUVAFAKAT").Range("A25")
Worksheets("VERİ").Range("I" & say) = Worksheets("MUVAFAKAT").Range("C28")
Worksheets("VERİ").Range("J" & say) = Worksheets("MUVAFAKAT").Range("G41")
Worksheets("VERİ").Range("K" & say) = Worksheets("MUVAFAKAT").Range("G42")
Worksheets("VERİ").Range("L" & say) = Worksheets("MUVAFAKAT").Range("G43")
Worksheets("VERİ").Range("M" & say) = Worksheets("MUVAFAKAT").Range("U43")
Worksheets("VERİ").Range("N" & say) = Worksheets("MUVAFAKAT").Range("U44")
Worksheets("VERİ").Range("O" & say) = Worksheets("MUVAFAKAT").Range("U45")
End If
End Sub
Private Sub CommandButton1_Click()
Dim x As Boolean
x = False
For i = 1 To Sheets("VERİ").Cells(65536, 1).End(xlUp).Row
If TextBox1.Text = Sheets("VERİ").Cells(i, 1) And TextBox2.Text = Sheets("VERİ").Cells(i, 2) Then
x = True
MsgBox ("Mükerrer kayıt")
Exit For
End If
Next i
If x = False Then
Sheets("VERİ").Cells(i, 1) = TextBox1
Sheets("VERİ").Cells(i, 2) = TextBox2
say = Worksheets("VERİ").Range("A65530").End(3).Row + 1
Worksheets("VERİ").Range("A" & say) = Worksheets("MUVAFAKAT").Range("K5")
Worksheets("VERİ").Range("B" & say) = Worksheets("MUVAFAKAT").Range("K4")
Worksheets("VERİ").Range("C" & say) = Worksheets("MUVAFAKAT").Range("K6")
Worksheets("VERİ").Range("D" & say) = Worksheets("MUVAFAKAT").Range("A10")
Worksheets("VERİ").Range("E" & say) = Worksheets("MUVAFAKAT").Range("A14")
Worksheets("VERİ").Range("F" & say) = Worksheets("MUVAFAKAT").Range("Y18")
Worksheets("VERİ").Range("G" & say) = Worksheets("MUVAFAKAT").Range("Y19")
Worksheets("VERİ").Range("H" & say) = Worksheets("MUVAFAKAT").Range("A25")
Worksheets("VERİ").Range("I" & say) = Worksheets("MUVAFAKAT").Range("C28")
Worksheets("VERİ").Range("J" & say) = Worksheets("MUVAFAKAT").Range("G41")
Worksheets("VERİ").Range("K" & say) = Worksheets("MUVAFAKAT").Range("G42")
Worksheets("VERİ").Range("L" & say) = Worksheets("MUVAFAKAT").Range("G43")
Worksheets("VERİ").Range("M" & say) = Worksheets("MUVAFAKAT").Range("U43")
Worksheets("VERİ").Range("N" & say) = Worksheets("MUVAFAKAT").Range("U44")
Worksheets("VERİ").Range("O" & say) = Worksheets("MUVAFAKAT").Range("U45")
End If
End Sub