Aşağıdaki makro 0 (sıfır) değeri veriyor.Acaba hata nerede.Yardımcı olursanız sevinirm. G sütununda tutarlar, C sütununda tarihler yazıyor.Textbox 1 ve 2 ye başlangıç ve bitiş tarihleri girildiği zaman Label1 de sonuç değerini veriyor.
For X = 1 To 1000
a = Application.WorksheetFunction.SumIfs(Sheets("Sayfa5").Range("G:G"), Sheets("Sayfa5").Range("C:C"), ">=" & TextBox1.Value, Sheets("Sayfa5").Range("C:C"), "<=" & TextBox2.Value)
Label1.Caption = a
Next X
For X = 1 To 1000
a = Application.WorksheetFunction.SumIfs(Sheets("Sayfa5").Range("G:G"), Sheets("Sayfa5").Range("C:C"), ">=" & TextBox1.Value, Sheets("Sayfa5").Range("C:C"), "<=" & TextBox2.Value)
Label1.Caption = a
Next X
