- Katılım
- 12 Nisan 2012
- Mesajlar
- 533
- Excel Vers. ve Dili
- Microsoft office professional plus 2019
Merhabalar.Aşağıdaki kod ile userformdan excel sayfasına kayıt yapıyorum."A" sutununda isim "C" sütununda ilaç adı var.Yapmak istediğim "A" ve "C" sütununa girilen değerler aynı anda "F" ve "G" sutunlarına da kayıt yapsın ama bir sefere mahsus kayıt yapacak yani "F" ve "G" sütununda sadece 1 tane "A" ve "C" değeri olacak.Ekran görüntüsünden daha iyi anlaşılacaktır.Yardımlarınız için Teşekkür ediyorum.
Set s1 = Sheets("Kayıt")
i = Sheets("Kayıt").Cells(Rows.Count, "a").End(3).Row + 1
Sheets("Kayıt").Cells(i, "a") = UserForm1.TextBox1.Text
Sheets("Kayıt").Cells(i, "b") = UserForm1.TextBox2.Text
Sheets("Kayıt").Cells(i, "c") = UserForm1.TextBox3.Text
If CheckBox1.Value = True Then s1.Cells(i, "d") = UserForm1.TextBox6
If CheckBox2.Value = True Then s1.Cells(i, "e") = UserForm1.TextBox6
If CheckBox3.Value = True Then s1.Cells(i, "h") = UserForm1.TextBox6
If CheckBox4.Value = True Then s1.Cells(i, "ı") = UserForm1.TextBox6
If CheckBox5.Value = True Then s1.Cells(i, "j") = UserForm1.TextBox6
Set s1 = Sheets("Kayıt")
i = Sheets("Kayıt").Cells(Rows.Count, "a").End(3).Row + 1
Sheets("Kayıt").Cells(i, "a") = UserForm1.TextBox1.Text
Sheets("Kayıt").Cells(i, "b") = UserForm1.TextBox2.Text
Sheets("Kayıt").Cells(i, "c") = UserForm1.TextBox3.Text
If CheckBox1.Value = True Then s1.Cells(i, "d") = UserForm1.TextBox6
If CheckBox2.Value = True Then s1.Cells(i, "e") = UserForm1.TextBox6
If CheckBox3.Value = True Then s1.Cells(i, "h") = UserForm1.TextBox6
If CheckBox4.Value = True Then s1.Cells(i, "ı") = UserForm1.TextBox6
If CheckBox5.Value = True Then s1.Cells(i, "j") = UserForm1.TextBox6
