- Katılım
- 14 Şubat 2007
- Mesajlar
- 400
- Excel Vers. ve Dili
- excel 2003 türkçe
Değerli Üyeler,
Yapmak istediğim tanımlanan bir alana şartlı olarak veri kaydetmek. Örnek dosyamda ayrıntlarıyla açıklandı. Ancak özetle, yapmak istediğimi sadece 1.alan için ve 4 günlük tarih içerisinde yapabildim. Ancak, 4 gün yerine 30 gün almayı düşündüğümde ise kodların satırı çok fazla oluyor. Hele bir de alan 2., alan 3, alan 4 vb. tanımlarsam kodları yazmak ve uygulayabilmek mümkün görünmüyor.
Bu isteğimin excel ile ve kod yazılması ile mümkünü var mı? Yoksa bir program yazılmasını mı gerektiriyor? En azından bunu öğrenmek istiyorum.
Yardımlarınız için şimdiden teşekkürler!!!
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Select
If CheckBox1.Value = True And ComboBox1.Value = 1 Then Range("b7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 2 Then Range("c7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 3 Then Range("d7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 4 Then Range("e7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 5 Then Range("f7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 6 Then Range("g7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 7 Then Range("h7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 8 Then Range("ı7").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 1 Then Range("b8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 2 Then Range("c8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 3 Then Range("d8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 4 Then Range("e8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 5 Then Range("f8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 6 Then Range("g8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 7 Then Range("h8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 8 Then Range("ı8").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 1 Then Range("b9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 2 Then Range("c9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 3 Then Range("d9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 4 Then Range("e9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 5 Then Range("f9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 6 Then Range("g9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 7 Then Range("h9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 8 Then Range("ı9").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 1 Then Range("b10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 2 Then Range("c10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 3 Then Range("d10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 4 Then Range("e10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 5 Then Range("f10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 6 Then Range("g10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 7 Then Range("h10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 8 Then Range("ı10").Value = ComboBox5.Value
aciklama = "Kayıt işlemi tamamlandı."
dugme = vbOKOnly + vbInformation + vbDefaultButton1
baslik = "KAYIT"
MsgBox aciklama, dugme, baslik
Unload Me
UserForm1.Show
End Sub
Yapmak istediğim tanımlanan bir alana şartlı olarak veri kaydetmek. Örnek dosyamda ayrıntlarıyla açıklandı. Ancak özetle, yapmak istediğimi sadece 1.alan için ve 4 günlük tarih içerisinde yapabildim. Ancak, 4 gün yerine 30 gün almayı düşündüğümde ise kodların satırı çok fazla oluyor. Hele bir de alan 2., alan 3, alan 4 vb. tanımlarsam kodları yazmak ve uygulayabilmek mümkün görünmüyor.
Bu isteğimin excel ile ve kod yazılması ile mümkünü var mı? Yoksa bir program yazılmasını mı gerektiriyor? En azından bunu öğrenmek istiyorum.
Yardımlarınız için şimdiden teşekkürler!!!
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Select
If CheckBox1.Value = True And ComboBox1.Value = 1 Then Range("b7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 2 Then Range("c7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 3 Then Range("d7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 4 Then Range("e7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 5 Then Range("f7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 6 Then Range("g7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 7 Then Range("h7").Value = ComboBox5.Value
If CheckBox1.Value = True And ComboBox1.Value = 8 Then Range("ı7").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 1 Then Range("b8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 2 Then Range("c8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 3 Then Range("d8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 4 Then Range("e8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 5 Then Range("f8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 6 Then Range("g8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 7 Then Range("h8").Value = ComboBox5.Value
If CheckBox2.Value = True And ComboBox2.Value = 8 Then Range("ı8").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 1 Then Range("b9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 2 Then Range("c9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 3 Then Range("d9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 4 Then Range("e9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 5 Then Range("f9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 6 Then Range("g9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 7 Then Range("h9").Value = ComboBox5.Value
If CheckBox3.Value = True And ComboBox3.Value = 8 Then Range("ı9").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 1 Then Range("b10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 2 Then Range("c10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 3 Then Range("d10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 4 Then Range("e10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 5 Then Range("f10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 6 Then Range("g10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 7 Then Range("h10").Value = ComboBox5.Value
If CheckBox4.Value = True And ComboBox4.Value = 8 Then Range("ı10").Value = ComboBox5.Value
aciklama = "Kayıt işlemi tamamlandı."
dugme = vbOKOnly + vbInformation + vbDefaultButton1
baslik = "KAYIT"
MsgBox aciklama, dugme, baslik
Unload Me
UserForm1.Show
End Sub
