• DİKKAT

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

checkbox ta işaretlenen kutucuğa göre aynı olan verileri toplamak

Katılım
12 Şubat 2007
Mesajlar
144
Excel Vers. ve Dili
2003
ekteki dosyada checkboxta işaretlediğimiz veri ve iki tarih aralığında aynı olan ebatların(aynı verileri bulup ikinci kalite adetlerinin toplamını verecek şekilde) ikinci kalite adetlerini toplamak istiyorum yardımcı olacak arkadaşlara şimdiden tşk ederim.
 
Selamlar,

Formunuzdaki butona aşağıdaki kodu uygulayıp denermisiniz. Umarım faydası olur.

Kod:
Private Sub CommandButton1_Click()
    CBox1 = IIf(CheckBox1 = True, CheckBox1.Caption, 0)
    CBox2 = IIf(CheckBox2 = True, CheckBox2.Caption, 0)
    CBox3 = IIf(CheckBox3 = True, CheckBox3.Caption, 0)
    CBox4 = IIf(CheckBox4 = True, CheckBox4.Caption, 0)
    CBox5 = IIf(CheckBox5 = True, CheckBox5.Caption, 0)
    CBox6 = IIf(CheckBox6 = True, CheckBox6.Caption, 0)
    Date1 = CDate(DTPicker1)
    Date2 = CDate(DTPicker2)
    TextBox1 = 0
    TextBox2 = 0
    For X = 6 To [A65536].End(3).Row
    If Cells(X, 1) >= Date1 And Cells(X, 1) <= Date2 Then
    If Cells(X, 256) = CBox1 Or Cells(X, 256) = CBox2 Or Cells(X, 256) = CBox3 Or Cells(X, 256) = CBox4 Or Cells(X, 256) = CBox5 Or Cells(X, 256) = CBox6 Then
    TextBox1 = Format(CDbl(TextBox1) + Cells(X, 5), "#,##0.00")
    TextBox2 = Format(CDbl(TextBox2) + Cells(X, 6), "#,##0.00")
    End If: End If: Next
End Sub
 
Son düzenleme:
Checkboxlardan her seferinde sadece bir tanesini işaretli olacaktır.
 
TŞk Edİyorum

Sorunsuz ÇaliŞti.baŞarilarinizin Devamini Dİlİyorum.
 
Geri
Üst